Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Fat Pug Studio on May 30, 2019, 06:56:39 AM
-
Hi all,
i'm trying to find a solution for rotating some missiles towards direction.
After they're being fired they are moved using translate with no set target. I'm not using velocity so i can't get the direction with velocity data (it's 0,0 since i'm translating the missiles), and i don't know how can i get the direction every frame to apply the rotation by using some other method.
All ideas except "move them using velocity" are welcome ;D
Edit: of course, the child will be rotating so it doesn't affect the movement.
-
I was just wondering, if i get the current position and last frame position, and subtract current from last frame position i should be getting the vector that shows the missile's heading. How can i apply that vector to the rotation of the child object?
-
Or maybe simply rotate towards last frame position but in opposite direction, hmmm.
-
Got it the simple way. Get position, look at with 180 degree offset in the next state, loop.