hi there,
I was wondering, how should I multiply that vector so that I can use it to control de direction?
can I do something like this:
m_Bullets[i].Direction.x = m_Bullets[i].Speed * Sprite_Mouse.x ;
m_Bullets[i].Direction.y = m_Bullets[i].Speed * Sprite_Mouse.y ;
The fact is that my angle is reduced from 30.0f to -30.0f (ergo, 330.0f, but counting backwards to zero and then from 360.0f to 330.0f) but doing that makes my bullets go always in the same X direction...
I tried doing something like:
m_Bullets[i].Direction.x = ( (angle>180.f || angle<0.0f) ?m_Bullets[i].Speed : -m_Bullets[i].Speed ) * Sprite_Mouse.x ;
But it just doesnt work =/...meaning, angle is a var that actually works great that goes from 30.0f to 330.0f backwards.
Any ideas?