In the image above, I have a plane and a perspective camera.
I want to move the camera along Y axis until it can exact see the full plane.
how can I get the exact position Y value like this? camera.position.y = magicFunction(plane.scale, camera.fov)
FYI. the plane and camera are both centered at origin and camera face to the plane.
There are lots of lines in the screen, and I need to focus the line which user clicked.
The focus effect I need is move the camera to the center of the line, and look down the whole line.
The problem is I don’t know the position y of camera that makes the whole line in sight.
Sorry for my poor English