I will post the ones I come across and can explain a use for, so far I got;
Code: Select all
// find a Point using Direction and Distance from a Given Point
find_x=given_x+(sin(-1*direction*2*PI)*distance);
find_y=given_y+(cos(-1*direction*2*PI)*distance);
Code: Select all
// set X and Y Componets of Velocity using Direction and Speed
set_velocity_x=speed*sin(-1*direction*2*PI);
set_velocity_y=speed*cos(-1*direction*2*PI);
Code: Select all
// set an objects velocity based on a mouse pointer position (shots in a top down game) currentModel.rotation.Z=atan2((currentModel.position.y-mouse_pointer.position.y),
(currentModel.position.x-mouse_pointer.position.x))+PI/2;
currentModel.velocity.x=11*sin(-1*currentModel.rotation.Z);
currentModel.velocity.y=11*cos(-1*currentModel.rotation.Z);
peace