Setting of upper lower limit value for alpha , beta and radius in arc rotate camera

how to set the upper and lower limit value for alpha , beta and radius in arc rotate camera so that the camera will not crosses the wall of the room.
please provide me the proper value for that .
Many Thanks

I believe a proper value will depend on your room dimensions.
It is also possible to use these values dynamically - cast a ray from camera in the opposite direction and if the closest mesh is too close, decrease the radius in small steps.

You can turn on camera collisions like in this example:

1 Like

How can we measure our room dimension with the help of ray ? Can you please explain it or please send some example also

@Ankit please do not multiply topics on the same subject as it makes it harder for others to find an answer and for us to answer them all :slight_smile:

and this one.

So let s keep the conversation in this one.

I would suggest you use @RaananW solution with collision if you are not too familiar with 3d dev and/or javascript

3 Likes

Here is just a small example, but maybe it is too complicated - BabylonJS-CharacterController/CharacterController.ts at master · ssatguru/BabylonJS-CharacterController · GitHub
I think it is better for you to use @RaananW solution with collision (of course it may depend on your use case which we don’t know much about).