playMaker

Author Topic: Rotation of an object when it moves  (Read 1602 times)

pampapic

  • Playmaker Newbie
  • *
  • Posts: 15
Rotation of an object when it moves
« on: October 04, 2013, 05:04:25 PM »
Hello !

I'm new to playmaker and i'm working on a shoot em up game (vertical scrolling) for iOS. 3D graphics but top view like the old school shmup games  :).

I've already done the touch controls of the spaceship, basically it just follow the movement of your finger, like in all the other shoot em up on iOS.

But I would like the spaceship to slowly rotate a bit when it moves to a direction (left or right) and if the spaceship stop to moves, it must slowly go back to its inital rotation.

I really don't know how to do that !! If you have any idea i'll be happy to get some advice from you...

Thanks in advance and sorry for my english, i try to do my best :)

Pampapic

Daphnis26

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Rotation of an object when it moves
« Reply #1 on: October 04, 2013, 05:23:56 PM »
Hey, have you tried the smooth look at Action? Sounds like it could do what you need.

To return to original rotation I would set up a vector3 variable with a high X Y or Z amount, like 10,000, then set that variable as the look at object.