Direction Vector not working correctly
Members - Reputation: 157
Posted 03 September 2012 - 07:51 AM
Does anyone know what to do. I am writing this is AS3 but I got this system working before in C# with XNA.
thanks in advance,
Members - Reputation: 128
Posted 03 September 2012 - 06:48 PM
[source lang="csharp"]Vector2 direction = target - position;direction.normalize( );missleVelocity = missle_speed * direction[/source]
Edited by Labouts, 03 September 2012 - 06:52 PM.
Members - Reputation: 568
Posted 03 September 2012 - 07:01 PM
Once the missile is launched are you keeping track of the missile's original direction vector or are you recalculating it as you go?