View space z-direction

Hi,

in what direction in view space (after applying UNITY_MATRIX_MV) is z pointing.
Is it from camera positive into the screen or is it negative so z is pointing towards the camera (out of the screen)

I couldn’t find any site with an answer. :frowning:
With try and error I found out that it seems to be like openGL → so camera is facing negative z value.

Is this correct?

Thank you very much
Mark

View space (or camera space) and clip space (or projection space) are different things. OpenGL and D3D differ in projection space direction, and there are helper variables for that, but I believe view space is the same. It also matches what you see in the editor. If you place a game object as a child of the camera, that should match the coordinates of an object transformed by the UNITY_MATRIX_MV.

1 Like

Thanky you :slight_smile: