Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: dudebxl on September 30, 2015, 02:17:05 PM

Title: rotate in direction of force
Post by: dudebxl on September 30, 2015, 02:17:05 PM
I am getting old so I would need some advice.

I have an object and I want it to rotate and face the direction of the movement (physics based).

Any ideas..
Title: Re: rotate in direction of force
Post by: jeanfabre on September 30, 2015, 03:36:16 PM
Hi,

 Use the velocity ( GetVelocity action ) of the moving object, this is the direction to look at. Since the velocity always points where the object is moving.

Bye,

 Jean

Title: Re: rotate in direction of force
Post by: dudebxl on October 01, 2015, 01:27:02 PM
Hi,

thanks but it was quicker and easier to find a code snippet on the net than understanding everything i have to do..  ::)

I made an action of it: http://hutonggames.com/playmakerforum/index.php?topic=11284.0