Guided Missile

I am working on my first side scrolling game an I can't get the bosses missile to accelerate and continue tracking the main ship.
Thanks in advance!
Thanks in advance!

Comments
Create 2 real attributes (global) called ShipX & ShipY
Go inside the ship:
Constrain attribute ShipX to self.position.X
Constrain attribute ShipY to self.position.Y
When you shoot the guided missile, instead of accelerate toward use the interpolate:
Interpolate self.position.X to ShipX
Interpolate self.position.Y to ShipY
If for some reason the interpolation does not work, use the Move To behavior. Move to ShipX & ShipY
This makes the missiles swing over the target and when you 'dodge' which gives a realistic effect.
Good luck!
Lump Apps and My Assets
Matt
I have this in one of my prototypes.
I used an accelerate to (the shipX and shipY)
It will keep following it but with a delay so when you move your ship and it misses it will come back in a nice circle. Looks awesome.
Lump Apps and My Assets
Thank you for correcting me
Matt