-
Placing camera as if rightclick -> New – > Camera
I’m writing a script where it adds a new camera.
I’m having some problems placing the camera. I want it to be places as if I would rightclick and pick new -> Camera.
Right now it’s positioned in compHeight/2 and compWidth/2 but the z-depth I can’t figure out how to calculate it.
In a 1080p project (1920*1080p) the Z = -2666,6667 and in a 4K project (4096*2160) the Z = -5688,8889. Both cameras is using 50mm.
Does anyone know the math or an easyer way to place the camera correct?
Thanks!