Sign in to follow this  

What do I need to do to Translate Z?

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

Hello, I am using c# and managed directx, but I know it is the same in c++ and unmanaged. I can translate in x and y just fine, but I am having trouble with z. I try to do it and it just disappears. I have turned on Zenable in the render state. I was thinking it might be my matrix multiplication. I first multipy the scale and the rotation, then that by the translation to get my world transformation. Is there something I am missing?

Share this post


Link to post
Share on other sites
I think I figured it out, I was using an orthographic view, but even that has a znear and a zfar. anyway I changed it to a perspective view with a view looking at the center and now the z translates. Is there a reason I can't do it with an orthographic?

Share this post


Link to post
Share on other sites
As far as I know the orthognal view is used for displaying a 2D scene, thus only the x,y axes are used. The z values has the same purpose like in a perspective view, though in an orthognal view the z axis has no effect on an object's size (unlike the perspective view which reduces object's size depending on how far it is). You can use z values with your objects in an orthognal view to specify if an object should be drawn before or after other objects. (Using the ZEnable flag)

Share this post


Link to post
Share on other sites

This topic is 4553 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this