Is there a way to increase the size of the collider? That is in this example I am using plane but its collision thickness is very thin due to which when the camera collides with it, the user can see what is on the other end. How do I restrict the camera right infront of the plane?
You can try to increase the ellipsoid of the mesh used for the collision, see here: Cameras, Mesh Collisions and Gravity - Babylon.js Documentation
Hi, thank you for your reply. I actually had tried this but my camera started acting strange while colliding. Can I increase the plane’s bounding box instead?
Yes, see provided doc link, the meshes also have a collision ellipsoid.
Could you please see this link:
I am trying to define an ellipsoid for the plane but it has no effect.
My bad, I’m not familiar with the collision system, the ellipsoid mesh must be used when checking for collisions when the mesh is moving…
Using the camera ellipsoid does work for me: https://playground.babylonjs.com/#DYDRMG#9
Another way would be to create a dummy bigger plane around the actual plane but invisible, only for collision purpose.
Yes ofc, I could create invisible objects. But my mesh would be of complex shapes unlike the plane in the example. I was actually trying to increase the bounding box size (x, y, z) of the mesh.
I think the bounding box is only used for fast checking, but if there is a collision according to this fast checking, then a precise checking against the geometry is performed…