Quote:
Originally posted by Kaimetsu
Okiedokie.
Maintain an (dx,dy) for your current velocity. Add to it when you use the thruster in a given direction (dx+accel*cos(ang),dy+accel*sin(ang)) and limit the total speed with a unit vector. Ie:
mag=(dx^2+dy^2)^0.5;
if(mag>maxspeed){
dx=maxspeed*dx/mag;
dy=maxspeed*dy/mag;
}
|

I learned about vectors and unit vectors in school last week
But I like your explanation kai this is very useful.