Jump to content
• Advertisement

# Coordinate Systems, rotations and default values.

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

If you intended to correct an error in the post then please contact us.

## Recommended Posts

hey everyone, there are some questions that i was unable to answer myself and i hope you can answer. 1.) default-direction: when i do have a rotation-vector to describe the rotation of my object with three angles and every angle is 0, in which direction am i looking??? 2.) is the direction different depending on whether i am using a left-handed or right-handed coordinate-system?? 3.) as far as i know rotation is normally clockwise. again: is this different depending on the coordinate-system being left-handed or right-handed? thanks a lot for the help! best regards

#### Share this post

##### Share on other sites
Advertisement
1. Assuming you're talking about the OpenGL and DirectX rendering pipelines, projection is performed along the z-axis. And so the 'default' orientation will look along the z-axis.

2. Potentially, yes. Handedness is often described as being analogous to the direction in which the z-axis points, and so a straight switch in handedness of the coordinate system will invert this default direction. However, the projection operation can account for this if necessary, and so this may well be invariant between differently handed pipelines. Perhaps somebody who is fluent in both DirectX and OpenGL could tell us which is accepted as standard.

3. Rotation isn't normally anything, but if I had to pick, I'd say that anticlockwise is more common, for the simple reason that it leads to fewer negative parameters throughout geometry. But as in (2), a switch in coordinate handedness will lead to rotations going the 'wrong' way, simply as it can be viewed as a reflection in the xy-plane. However, many more factors come into play and so we couldn't say for sure.

3D geometry is littered with these parity idiosyncrasies and sometimes it can be a real chore making sure you have everything correct in the set {handedness, vector-major layout, row vs. column notation, y or z 'up', clockwise or anticlockwise rotations}.

#### Share this post

##### Share on other sites
Thanks Admiral, that was really helpful for my understanding.

greetings,
anchelito

#### Share this post

##### Share on other sites
1. The direction of an unrotated vector is completely up to you. I generally use the X axis. In OpenGL, an unrotated camera looks in the -Z direction. In DirectX, an unrotated camera looks in the +Z direction. These might just be defaults.

2. No. It depends on the convention. See #1.

3. A positive rotation around an axis pointing towards you is counter-clockwise in a right-handed system and clockwise in a left-handed system.

#### Share this post

##### Share on other sites

• Advertisement

### Announcements

• Advertisement

• ### Popular Contributors

1. 1
2. 2
3. 3
Rutin
22
4. 4
5. 5
khawk
14
• Advertisement

• 9
• 11
• 11
• 23
• 10
• ### Forum Statistics

• Total Topics
633651
• Total Posts
3013134
×

## Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!