Rocket laucher following actor
Hey guys
Im working on a game and im basically writting down some ideas, and i came cross one i havent done before, but its basically seen in every tower defence game out there.
I want to have say a rocket launcher follow the main actor and shoot at it, ideally the rocket rotates in its axis to give it a realistic following look.
Any ideas or insights on how to acomplish this?
Thanks
Im working on a game and im basically writting down some ideas, and i came cross one i havent done before, but its basically seen in every tower defence game out there.
I want to have say a rocket launcher follow the main actor and shoot at it, ideally the rocket rotates in its axis to give it a realistic following look.
Any ideas or insights on how to acomplish this?
Thanks
Answers
Rotate To Position: targetX, targetY
or
Constrain: launcher.rotation = vectorToAngle(targetX - launcherX, targetY - launcherY)