playMaker

Author Topic: rotate in direction of force  (Read 1372 times)

dudebxl

  • Hero Member
  • *****
  • Posts: 602
rotate in direction of force
« 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..

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: rotate in direction of force
« Reply #1 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


dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: rotate in direction of force
« Reply #2 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