How to calculate the appropriate observation position of objects in the scene? Big boys can help

There is a requirement that a random image of the size be placed in the scene. It is necessary to calculate the size of the scene and the wall to ensure that objects can be observed, and that the characters need to stay on the ground

A typical approach of viewers is to compute the bounding box of the scene and then compute the related center and size properties to position/orient the camera. You can find some code for this here:

How do I calculate if a wall is blocking me,The picture may be very large, and the camera will run out of the wall to see the wall

Not sure I understand. Do you mind illustrating what you are describing?

1 Like

Similar to the video, this hallway is very short, and when viewing objects, they stay on the hallway instead of falling under the floor

How to calculate the appropriate observation position for an object, the camera needs to be on the ground and not obstructed by other objects, using the Threejs version r150
Please help me achieve it