Computer Science Canada

Object Rotation

Author:  Master [ Thu May 06, 2004 3:09 pm ]
Post subject:  Object Rotation

Does anyone know how to rotate a rectangle or an object that looks like a rectangle that can be rotate.

Ex. the (up) key is to move up, but if you rotate the object 180degrees, the (up) keys moves downward


Author:  Tony [ Thu May 06, 2004 4:50 pm ]
Post subject: 

eh... just use the angle to move in that direction Thinking

x = cos(angle) * distance;
y = sin(angle) * distance;

locationX = locationX + x;
locationY = locationY + y;