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

Low speed RigidBody overlaps StaticBody then bounces back when collision happens even with CCD enabled and 0 bounce #43605

Open
Tracked by #45333
awkr opened this issue Nov 17, 2020 · 6 comments

Comments

@awkr
Copy link

awkr commented Nov 17, 2020

Godot version:
v3.2.3.stable.official

OS/device including version:
Device: Macbook Pro 2016
OS: macOS Big Sur 11.0.1

Issue description:
Yes, I've searched a lot but none of them works.

1️⃣ Given a scenario: In 3D world, there's a StaticBody as ground, a RigidBody with Capsule CollisionShape as player.

2️⃣ Action: Player falls freely to the ground from a low height.

3️⃣ Result: As the title says, player can detect collision and stopped as wanted. But if we look close, the player overlays with the ground (also called tunnelling?), then bounces back, even through the Bounce property of player and ground all set to 0!

4️⃣ Try to solve: I've tried these steps:

  1. Enable CCD.
    not working :(
  2. Switch physics engine from Bullet to GodotPhysics, and increase physics FPS from 60 to 90.
    Hmmm seems better, but still some glitches when I stare at the screen...(forgive my perfectionism). Besides I don't think is a better way to solve this kind problem.

5️⃣ Wanted: when bounce is 0 and collision happens, player should stop immediately, no overlaps, no bounce, it should stand still, right here waiting for you :)

Please help me, thank you all.

Minimal reproduction project:
The minimal project contains 3 objects: Ground(StaticBody), Player 1(KinematicBody), Player 2(RigidBody).
Player 1 works right, Player 2 overlaps and bounces back which is not wanted.

Basic3D.zip

@awkr awkr changed the title #3D RigidBody overlaps StaticBody then bounces back with low speed when collision happens even with CCD enabled and 0 bounce #3D Low speed RigidBody overlaps StaticBody then bounces back when collision happens even with CCD enabled and 0 bounce Nov 17, 2020
@Rubonnek
Copy link
Member

Possible fix: #35945
Related: #35780

@awkr
Copy link
Author

awkr commented Nov 17, 2020

Possible fix: #35945
Related: #35780

Great, thank you for information! When will the new version release?

@capnm
Copy link
Contributor

capnm commented Nov 17, 2020

Switch physics engine from Bullet to GodotPhysics

ERROR: CylinderShape is not supported in GodotPhysics. Please switch to Bullet in the Project Settings. at: shape_create (servers/physics/physics_server_sw.cpp:73)

Don't do this.

RigidBody overlaps StaticBody

You might have misunderstood how mesh and collision shape in Godot works. I don't see any issues (v323 linux):
grafik

works-fine.zip

@awkr
Copy link
Author

awkr commented Nov 17, 2020

@capnm Thanks for your nice try. I've tried your kind artifact, didn't change anything, sorry that I still have the overlap problem. Here is my snapshot(GIF):
2020-11-17 15_45_01

@awkr
Copy link
Author

awkr commented Nov 17, 2020

@Rubonnek @capnm Just to mention that, I've compiled the latest Godot(branch master, Godot version v4.0.dev.custom_build.fbe0386c6) and run @capnm project, hmmm, it seems the problem still lies in v4.0. 💔

@akien-mga
Copy link
Member

Seems still reproducible in 3.5 RC 1, and it's indeed specific to the GodotPhysics backend, it doesn't happen with Bullet.

@akien-mga akien-mga changed the title #3D Low speed RigidBody overlaps StaticBody then bounces back when collision happens even with CCD enabled and 0 bounce Low speed RigidBody overlaps StaticBody then bounces back when collision happens even with CCD enabled and 0 bounce May 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants