Is there a way to calculate the camera’s fov so that the camera view fits to object dimension and canvas size ?
I found a way to make the fov camera adjust to the size of the object in this forum:
Is there a way to calculate the camera’s fov so that the camera view fits the size of the object?
This is my PG:
I made a sample code where I created a box and then I positioned the camera very close to the box, after that I set the camera’s fov value (set manually) so that all parts of the object can be seen. but I want the camera’s fov value to adjust based on the size of the box, until the box looks ideal (not too close and not too far)
But I want the fov camera to be able to adjust to the canvas size too. because my project requires that it can run on all devices
This is the PG: