What I am trying to create
- An object that will launch a missile towards the player, if it collides with player, player dies.
The Problem
How does the missile move towards the player.
How do I make the missile move so that it does not instantly move directly towards the player(to slowly move on an angle).
I have a formula for the mouse to be the "Player" and the missile to go towards it.
mouse = Mouse.GetState();
mousePosition = new Vector2(mouse.X, mouse.Y);
A = (mouse.X - Position.X);
B = (mouse.Y - Position.Y);
C = (A * A) + (B * B);
C = (float)Math.Sqrt(C);
Angle1 = A / C;
Angle2 = B / C;
(Drawing is the best!)
This only gets the distance from missile to player, now I need to find the angle or something to move the missile, what do I need to do?