Is it possible to find distance between camera and a mesh?

Jul 25, 2014 at 8:00 PM
I need to know that is it possible to measure distance between camera position and mesh position?(for example camera position to center of mesh)
Jul 25, 2014 at 8:31 PM
Edited Jul 25, 2014 at 8:36 PM
@behname263,

If you mean the center of the mesh, there has to be at least 2 ways to use the mesh center as origin and camera position in 3d in a simple trig function... as in this example...

Or are you talking about the nearest point/vertices to the camera?

This may help as well, not knowing the actual issue: Fitting view with perspective camera