Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2D Physics Collision is 'Squishy' #34215

Closed
Tracked by #45334
DevinPentecost opened this issue Dec 9, 2019 · 3 comments · Fixed by #55602
Closed
Tracked by #45334

2D Physics Collision is 'Squishy' #34215

DevinPentecost opened this issue Dec 9, 2019 · 3 comments · Fixed by #55602

Comments

@DevinPentecost
Copy link
Contributor

Godot version:
3.1.2.stable.official

OS/device including version:
Windows 10

Issue description:
When two a RigidBody2D collides with a StaticBody2D, they 'squish' into each other and then the RigidBody2D slowly returns to the edge of the collision over a few frames. This makes the collision not feel quite so 'rigid' but instead like the StaticBody2D is squishy and allows other bodies to enter it temporarily. I have not checked to see if this behavior presents in 3D Nodes as well.

collision

Steps to reproduce:
Create a 2D scene with a RigidBody2D and a StaticBody2D. Have the RigidBody2D collide into the other body with some velocity. You'll observe the RigidBody2D enter the StaticBody2D.

Minimal reproduction project:
Zipped Project, open at run the scene.
Bouncy.zip

@gururise
Copy link
Contributor

gururise commented Dec 9, 2019

If you enable continuous collision detection (CCD), then the bodies should not overlap; however, CCD for 2D is currently not working, see issue #9071

@ZingBlue
Copy link

ZingBlue commented Dec 23, 2019

This almost breaks my entire game at times. I have no idea how to fix it either.

@Exxion
Copy link
Contributor

Exxion commented Dec 18, 2020

I believe setting the custom solver bias of any collision shapes involved to 1 should fix this, though given that it doesn't default to that, doing so probably causes other problems elsewhere. At a guess, it probably causes instability with collisions involving multiple bodies.

EDIT: I tested it. It does cause some instability, but it's not that bad.
There should probably be a project setting for the default bias instead of it being hardcoded to 0.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants