How to eliminate the HOMING from a missile?

LordTarantorLordTarantor Member, PRO Posts: 890
edited November -1 in Working with GS (Mac)
Hello everybody.
I want an enemy to shoot at a player, but I want the missile to go straight to the position were the player is at the moment of the shot. I don't want that if the player moves, dock or jump the missiles trajectory change trying to hit the player.

Comments

  • scitunesscitunes Member, Sous Chef Posts: 4,047
    in the missile have an accelerate towards in a timer. set the speed to a very high number and set the timer to a very small number (like .2 seconds)
  • LordTarantorLordTarantor Member, PRO Posts: 890
    Hello scitunes.
    When I grow up I want to be just like you.
    2nd time you save my brain from a hemorrhage.
    Thank you very much
  • ORBZORBZ Member Posts: 1,304
    Change Attribute self.rotation = vectorToAngle(targetX - self.position.x, targetY - self.position.y)

    Accelerate direction: 0 relative to actor (basically strait ahead)

    The idea here is that at as soon as the missile spawns it orients itself towards the target for one clock cycle. After that it just accelerates in a strait line. This uses less cpu cycles than scitunes idea because you don't need a timer and all the overhead associated with that. Plus, you can make the missile go as fast or as slow as you like. :)
  • LordTarantorLordTarantor Member, PRO Posts: 890
    Pure awesomeness...
    Thanks a lot ORBZ
Sign In or Register to comment.