Cannot go through the hole with First Person Camera View

Hello everyone!

I am trying to go through the hole with first-person camera view. This is what I have done so far.

The idea is that I just want to prevent going through the wall except the door hole. On line 29: I looped all the meshes and made collision set to true. How should the camera go through the hole except the wall?

Download Blender File

Welcome to the forum!

Like this:

camera.ellipsoid = new BABYLON.Vector3(0.3, 0.3, 0.5); // makde the camera collision shape smaller
camera.minZ = 0.1 // render walls very close to the camera
2 Likes

So the camera shape size is the reason for not going through the hole. Am I right? What if I make the hole bigger, or how can I know what’s the default collision size of the camera? Sorry if I ask a stupid question. :frowning: I’m just learning yet. :slight_smile:

1 Like

The ellipsoid itself is the camera/player size:

https://doc.babylonjs.com/features/featuresDeepDive/cameras/camera_collisions#2-define-an-ellipsoid

1 Like