Jump to content
Posted 16 May 2011 - 11:51 AM
Posted 16 May 2011 - 12:12 PM
float MoveX = float(2*sin((CameraAngle-90)*PI/180)); float MoveZ = float(2*cos((CameraAngle-90)*PI/180)); CameraPosX -= MoveX; CameraLookAtX -= MoveX; CameraPosZ += MoveZ; CameraLookAtZ += MoveZ;
Posted 16 May 2011 - 12:44 PM
A "direction of rotation" in the sense you're asking for doesn't exist. Instead, you want to rotate a direction vector (the one that defines the movement direction of the unrotated model) and use the result as direction of movement. Scale the rotated vector to consider the speed and elapsed time and add it to the position of the model's frame.
how to move the model in direction of rotation thanks. thanks a lot