What do I need to do to Translate Z?

Started by
1 comment, last by DesignerX 18 years, 10 months ago
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?
If you insist on saying "DUH", try to make a post that makes a little more sense
Advertisement
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?
If you insist on saying "DUH", try to make a post that makes a little more sense
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)
There is nothing that can't be solved. Just people that can't solve it. :)

This topic is closed to new replies.

Advertisement