Jump to content
  • Advertisement
Sign in to follow this  

How do I calculate the Z axis given the X and Y axis

This topic is 3318 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

I have been beating my head on this for a day now and can't figure it out. I have right handed 3D system and am given the direction of the relative positive x and y axis to an entity. I am trying to find the vector that represents positive z axis of the entity. In other words if the global or world axis are normally: X: 1.0 | 0.0 | 0.0 Y: 0.0 | 1.0 | 0.0 Z: 0.0 | 0.0 | 1.0 And my entity axis are defined as: X: +6.0 | -8.5 | +6.0 Y: -6.0 | -8.5 | -6.0 From this I can't seem to find a way to derive the vector of Z? This is driving me nuts oneway

Share this post


Link to post
Share on other sites
Advertisement
I don't quite sure understand the problem that you're describing, but to get a Z axis for a given X and Y axis, then what you want is the cross product of X and Y axis. X cross Y in this case will give you the positive Z axis in the right hand coordinate system.

Share this post


Link to post
Share on other sites
Quote:
Original post by nhatkthanh
I don't quite sure understand the problem that you're describing, but to get a Z axis for a given X and Y axis, then what you want is the cross product of X and Y axis. X cross Y in this case will give you the positive Z axis in the right hand coordinate system.


Thanks a million...





Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!