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

[GodotPhysics] Thin collision shapes cause resting RigidBodies to shake at low physics FPS #62819

Open
Tracked by #45333
kubecz3k opened this issue Jul 7, 2022 · 4 comments · May be fixed by #70816
Open
Tracked by #45333

[GodotPhysics] Thin collision shapes cause resting RigidBodies to shake at low physics FPS #62819

kubecz3k opened this issue Jul 7, 2022 · 4 comments · May be fixed by #70816

Comments

@kubecz3k
Copy link
Contributor

kubecz3k commented Jul 7, 2022

Godot version

c41e4b1 (4.x)

System information

Ubuntu 22.04

Issue description

By lowering physic tick rate to 30 I was able to observe that some bodies in the project I'm working on are trapped in kind of endless feedback loop and they are unable to rest:
rigid_shake

Probably worth to mention, I did similar test on Godot 3 and I was unable to reproduce similar behavior on mass = 1000 (weight 9800) with physic tick rate at 10 (on gif tick rate=20, mass = 100kg)

Steps to reproduce

  1. Lower project physics tick rate to 20
  2. Create new scene with Static body as a floor
  3. Create 3D RigidBody with a cube as a collider with default size, increase its mass to 100
  4. Put the cube above the ground
  5. Give it some angular velocity, experiment with various values
  6. You should be able to observe that the cube sometimes refuses to rest

Minimal reproduction project

rigid_shake.zip

@kubecz3k kubecz3k added this to the 4.0 milestone Jul 7, 2022
@kubecz3k
Copy link
Contributor Author

kubecz3k commented Jul 7, 2022

cc @pouleyKetchoupp

@Calinou
Copy link
Member

Calinou commented Jul 7, 2022

I can confirm this on 4.0.alpha 1b057e1.

This is caused by the floor's collision shape being too thin (0.1 units). Making it 1 unit instead solves the issue on my end. The issue is therefore similar to #9071, except it's happening with individual contacts rather than the entire body.

Probably worth to mention, I did similar test on Godot 3 and I was unable to reproduce similar behavior on mass = 1000 (weight 9800) with physic tick rate at 10 (on gif tick rate=20, mass = 100kg)

Can you test this with the 3D physics engine set to GodotPhysics in 3.x? Also, please upload the minimal reproduction project for Godot 3.x.

cc @pouleyKetchoupp

He's no longer involved in Godot, so please don't ping him in the future.

@Calinou Calinou changed the title Lowering physic tick rate can cause endless shaking of rigid body Thin collision shapes cause resting RigidBodies to shake at low physics FPS Jul 7, 2022
@kubecz3k
Copy link
Contributor Author

kubecz3k commented Jul 8, 2022

Even taking into account new information from @Calinou I'm unable to reproduce in 3.4.4.
Attaching 3.4.4 project if anyone feels like experimenting ShakyCollisionTest.zip (again not a reproduction since can't reproduce)

@rburing
Copy link
Member

rburing commented Jul 8, 2022

I can reproduce it in 3.5-rc6 and also 3.4.4, both with Godot Physics. It doesn't happen frequently though. Opening multiple Godot processes seems to reproduce it more quickly, but I was also able to reproduce it in a single process. The above ShakyCollisionTest.zip has the physics engine set to Bullet. I also wasn't able to reproduce it with Bullet.

@rburing rburing changed the title Thin collision shapes cause resting RigidBodies to shake at low physics FPS [Godot Physics] Thin collision shapes cause resting RigidBodies to shake at low physics FPS Jul 8, 2022
@Calinou Calinou changed the title [Godot Physics] Thin collision shapes cause resting RigidBodies to shake at low physics FPS [GodotPhysics] Thin collision shapes cause resting RigidBodies to shake at low physics FPS Jul 24, 2022
@akien-mga akien-mga modified the milestones: 4.0, 4.1 Feb 17, 2023
@akien-mga akien-mga modified the milestones: 4.1, 4.2 Jun 19, 2023
@YuriSizov YuriSizov modified the milestones: 4.2, 4.x Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants