Making an Enemy follow your Y axis
RSoftwareUK
Member, PRO Posts: 44
If you look at the image. I am trying to make the blue enemy follow my balloon sprite, but I don't want it to be as obvious as using the constraint attribute. I want it to follow more like it doesn't know which direction I am going to go (like real life).
I tried Constraint and it doesn't look very good.
Anyone any ideas? Thank you.
Comments
Track the red balloon's y position with a game attribute called redY
Use the following constraint in the blue balloon:
Constrain Attribute: self.Position.Y To: self.Position.Y +( game.redY - self.Position.Y )*.01
Try to use Accelerate toward instead of constraining.