godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.88k stars 20.15k forks source link

3D Kinematic Body collision/snap error when both CollisionShape and RayShape are enabled (Causing object to bolt/jolt downward instantly) #56996

Open Corruptinator opened 2 years ago

Corruptinator commented 2 years ago

Godot version

v3.4.2.stable.official [45eaa2daf]

System information

Windows 10, GLES3, Nvidia RTX 2080 SUPER

Issue description

Not sure if anybody is aware but I discovered a potential collision/slide snap bug:

What happened is that there are two CollisionShapes, one Capsule Shape and the other a RayShape, when both are enabled, it causes the object to bolt/jolt instantly downward. Where in comparision if you have one or the other disabled it causes the object to fall off a steep platform:

https://youtu.be/rWM5ZIxeb3I

Steps to reproduce

Create a KinematicBody in 3D, then give the KinematicBody two CollisionShape nodes, have the first one be a capsuleshape and the other a rayshape.

try disabling and enabling one another to see the difference:

Minimal reproduction project

3point4_Test.zip

I've included a demo file project so then you can take a look and experiment the collision/snap error.

Corruptinator commented 2 years ago

Sorry to break the silence but I wonder if there has been any progress on the issue so far?

Calinou commented 2 years ago

Sorry to break the silence but I wonder if there has been any progress on the issue so far?

As far as I know, nobody knows the cause of this bug yet. We only have a handful of physics contributors (and I'm not one of them), so this may take a while to be fixed.

Corruptinator commented 2 years ago

Understood, just figure I ask. I've been experimenting ways to minimize the error by using raycasts but so far I've been getting mixed results... Somewhat good but not close enough, and too many lines of code in GDScript.