Rocket laucher following actor

rommaromma Member Posts: 114
edited July 2012 in Working with GS (Mac)
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

Answers

  • rommaromma Member Posts: 114
    Bump
  • ORBZORBZ Member Posts: 1,304
    edited July 2012
    either:

    Rotate To Position: targetX, targetY

    or

    Constrain: launcher.rotation = vectorToAngle(targetX - launcherX, targetY - launcherY)
  • rommaromma Member Posts: 114
    This is what I had In mind, I'll give it a shot!
Sign In or Register to comment.