Fix 3D Camera clips through walls and floors at certain degree.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By congbinh75

I tried to create a first person kinematicbody and use the script from FPS tutorial on offical document page for giving it ablity to move and look around. It works fine until I move mouse to rotate the camera to look at the bottom, the camera appears to clip through the floor. And when I approach the wall, the camera also clips through the wall at certain degree (while i move the mouse to look down).

I copy the exact script from here:
https://docs.godotengine.org/en/stable/tutorials/3d/fps_tutorial/part_one.html

Thanks in advance.

:bust_in_silhouette: Reply From: Xian

Use ClippedCamera.
heres the link for the tutorial.

Thank you very much. But i have a small question.
I created a same set up in Godot 3.1 long ago and it didn’t have this issue.
When i open that old project with current stable version, it still don’t have any problem.
Do you know anything have changed or something ?

congbinh75 | 2020-09-03 05:37

There have been several changes between 3.1 and 3.2. The way I see it, the way things are done in 3.1 may not work in 3.2, but the exception would be working projects made on 3.1. Take minecraft saved worlds as an example, you may run an old world into the new version of the game but when you do, you’ll notice that there are some weird quirkiness left over. The reason why is because conversions of projects made with varying versions tend to not be 100% converted. This means that some of your codes would still work the same way it did back on 3.1. It may no longer work once you have updated that patch of code, similarly to how updating bugged out blocks in minecraft tend to cause a chain reaction.

Xian | 2020-09-03 05:59

I understood.
Thank you very much for your help.

congbinh75 | 2020-09-03 06:01