Hello, I’m having this bug in Godot for a long time and unsure how to solve it.
I’ve tried applying collision parameter safe margin of 0.04 to Human CharacterBody3D.
It didn’t solve it completely, only made it more rare to happen.
Godot Version
4.4
Question
Here is the Basic Project that replicates the bug where a CharacterBody3D jumps in the corner between collision shapes and makes the player unable to move or jump out; which is weird. What would it take to completely solve it?
my guess is you may want to add physics property to make character body 3D frictionless, or don’t use hard corner on terrain building to prevent this
i believe there should be settings to allow it to easily move on one side when it stuck right in the middle
did you modify the CharacterBody3D script or it’s default one?
did you modify the CharacterBody3D script or it’s default one?
Everything is a default.
This is not a good or correct way, more like a last resort.
This bug seems to be forever in Godot Engine and it is really game breaking.
My mind is blank I don’t know what to do really, I think every project on Godot is affected by this.
Enforcing to not have sharp edges/hard corners in the project still may not resolve, only minimize the issue.
The project I’ve shared is default general playground for this issue on Godot to do experiment on and try to resolve. It’s very basic and the issue is basic, but I’m too new in the gamedev to know how to resolve it.
CharacterBody2D and 3D has its move_and_slide function, basically it checks collisions every physics frame and move to one side if collided which is not as quick as process frame. So there is possibility you encounter things like this, able to go through wall/get stuck by moving too quick to one direction.
have you tried using jolt physics? since it’s already Godot 4.4
It’s one of the first things I’ve tried, it didn’t resolve it, although I’ve read on Google that for some it helped in some cases.
I’ve tested just now.
It felt different, but same issue of player unable to move or jump. Didn’t resolve anything.
All same issues persist.
Offtopic: So yeah, reverting back to default Physics Engine, since I’ve read Jolt have some different kind of bugs known. Even if Jolt would have worked, it’s too soon to use Jolt.
I have tested your solution of changing Max Angle to 60 degrees on both the sandbox and a real project and it most likely solves the issue, I can not see any new imminent problems. Thank you.
Real project settings:
After further investigation FloorMax Angle to 60 degrees did resolve the issue but there was also a need to change CollisionSafe Margin from 0.001 meters to 0.04 meters. to prevent same stuck issue.
Offtopic:
I personally also would recommend making the collision capsule smaller and placing at the bottom. This way making the character move through tight spaces easily.