Advertisement

calculating z coordinate of camera

Started by February 07, 2015 09:50 PM
9 comments, last by haegarr 9 years, 11 months ago
You say that I didn't provide you with w and h but isn't that my 1680 and 1050 or am I missing a step?

You wrote that the texture is 1680 by 1050 pixels which is a resolution. You wrote that the aspect ratio of the plane is 1680/1050 which is, well just a ratio. If you meant that the edge lengths of the plane are 1680 by 1050 length units in worlds space, than all is fine.

Also doesn't happycoders give me the z distance in pixels and not translated to z axis?

Dimension analysis of the formula:

[ z ] = [ h ] * [ tan(a) ]

where

[ tan(a) ] = 1

so

[ z ] = [ h ]

With respect to my first post above, where I hinted at the need for a plane in world space, you get

[ z ] = [ h ] = 1 lu (which means length unit)

So, if you feed that h as world dimension, you get that world dimension back.

This topic is closed to new replies.

Advertisement