My camera will go through objects with collision

Godot 4.1

I have a third person player camera and a spring arm, there is not any camera turning intentionally. I think that there is something wrong with my spring arm, or I need a script (I don’t have a script for the spring arm) but when my camera is too close to an object with collision, it will act normally, however it will clip right through the object and go behind it.

^ This is a video showing the problem, as well as all of the properties of my spring arm and camera.

What does the collision shape of the tree look like? Maybe the ray from the spring arm goes past left or right of the tree col shape.

Sidenote: Imho using a sphere as col shape for the spring arm gives better results. At least that is what I experienced when I used spring arm and it touched the ground (looking from the ground up).


The collision looks like this, and I tried the sphere spring arm, there was no difference.
(I might have settings wrong though?)

can you reduce the margin to something smaller like 0.01

I tried reducing it to 0.01 then 0.001, neither of them worked unfortunately.

I’m guessing, but if your SpringArm Shape radius exceeds the thickness of your characters collision shape this would likely cause this.

If a regular ray is no good, try a box with a z (I assume) of 0.01. Otherwise, I would play with offsetting the SpringArm’s Local position on the Z axis a bit.

I started messing around with the size of my players collision, and this seems to work, thanks!

1 Like