playMaker

Author Topic: Rotate Around: negative values problem  (Read 760 times)

pez

  • Playmaker Newbie
  • *
  • Posts: 12
Rotate Around: negative values problem
« on: June 22, 2019, 03:37:30 PM »
Hi,

I'm using the Rotate Around action to reset my camera behind the player.
I calculate how far of an angle it needs to travel & input this into the 'Stop Angle' field under Animation.

This works fine when the angle per second is moving in positive values (i.e 90deg per second, stop value 180)
But when it travels counter clockwise (-90 per second, stop value -180) it immediately thinks it has reached the stop angle. I'm assuming because it doesn't handle negative values for the stop angle.

And if the stop angle is kept as a positive value, but angle per second is negative to travel counter clockwise - it never stops, because the angle per second doesn't increase to the stop angle.

Any ideas on a solution to this would be greatly helpful. Just want it so the camera rotates the shortest distance back behind the player instead of doing an almost full 360 when it's just offset to one side!

Thanks,