Viewer position

I am working with one scene that looks like interior room During the process of viewing room ( 3d orbit, pan zoom) it might happen that user go outside the room.

Is it possible to constrain viewing only in room? (like wall collision) If not, is it possible to add some button/ functionality to revert camera to default position?

I tried with camera revert button, but it reverts after each movement which is a bit annoying…
What do you suggest?

The viewer doesn’t support collision detection. However, you can use the API to set restrictions on the camera position and target. Find more information here (section “Orbit controls Restriction”).