Hello,
I am creating a fps and I have a little problem.
I don’t really understand why my camera goes slightly through the meshes of my scene when it is supposed to be placed in the center of my player’s head.
Yet my player’s head and my player more broadly does not go through the meshs, which is the right behavior.
I have the impression that my camera is not “really” in the center of the character’s head but “protrudes” forward.
Here is a that illustrates my problem: https://playground.babylonjs.com/#TIYKC2#1
You can use the WSAD keys to move the character.
The bottom camera is there just to see the player’s behavior.
I hope I have been understandable, Thank you in advance.
The situation you are dealing with is connected to the camera frustum, and so called near and far clipping planes. If you worked in any 3D software you would experience same problem for the small object.
Basically, your camera near plane is clipping the object. Here you can see the image representation of what I am talking about.