"rotate 50º to the right and go straight till you reach the finish!"

Started by
9 comments, last by Pipo DeClown 21 years, 9 months ago
yes, as previous posters said, you need vector/matrix calcs...

however, in short: x''=x+speed*cos(angle);
y''=y+speed*sin(angle);

, where angle is in Radiians, (x'',0,y'') is new position and (x,0,y) is old position (im assuming its a simple first person control you need) .. so basically rotate your character by angle from standard position, and then use this to determine direction of motion. If you want realistic physics, you''ll also have to use acceleration to update speed.

This topic is closed to new replies.

Advertisement