#### Archived

This topic is now archived and is closed to further replies.

# Couple of quickies...

This topic is 5452 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi Guys, couple of questions I seek your aid with :-) Am converting an objects world velocity to object velocity and back again. Am using the following equation: Vx = cos(theta) * World_Vz + sin(theta) * World_Vx Vz = -sin(theta) * World_Vz + cos(theta) * World_Vx And to convert it back again I''m doing the same thing but replace Vx with World_Vx and vice versa. Anyone got the proof as to why this works?

##### Share on other sites
It looks like you are essentially multiplying your vectors by the 2x2 rotation matrix

cos(theta) sin(theta)
-sin(theta) cos(theta)

which rotates them into the local space of the matrix. The two rows of the matrix are orthogonal basis vectors in 2D, representing the local coordinate system of your object. If you don''t know about matrices already, you might be interested in learning about them, as they can speed up and make more elegant computations like the one you''re doing here (although in this case it wouldn''t make much difference). One good reference is "3D Math Primer" by Dunn and Parberry.

1. 1
2. 2
3. 3
Rutin
22
4. 4
5. 5

• 13
• 19
• 14
• 9
• 9
• ### Forum Statistics

• Total Topics
632936
• Total Posts
3009312
• ### Who's Online (See full list)

There are no registered users currently online

×