godotengine / godotengine/godot

2D Physics collision solver is explosive under pressure

Open
#119,962 1 comment 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

discussion topic:2d topic:physics
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

Tested versions

4.6.2, 4.6.3

System information

Happens on MacOs and Windows 11

Issue description

The 2D Physics solver is explosive when there are lots of bodies colliding under pressure. This is a problem for my game, but also in a solver stability test I made.

https://github.com/user-attachments/assets/10cb280d-d10c-423c-b8e6-c4eebf5efc42

The video above shows that reducing the contact_bias calms it down.

The PR here proposes changing default bias (breaking):
Change default physics bias to 0.2 (from 0.8) #119887

Steps to reproduce

Run a rigid body simulation with lots of objects under some pressure to collide with each other due to their own movement, or due to gravity.

Alternatively, download the godot-demo-projects/2d/physics_tests/ project attached to this issue. Run the main scene, select the test from the menu: Tests-> Functional tests->Solver->Bodies in Bucket. Run the test and play with the bias and other physics settings as desired. Let the bucket overflow and start putting pressure on.

Minimal reproduction project (MRP)

Download the test here (embedded within the godot-demo-projects/2d/physics_tests/ project).
physics_tests.zip

The test in the video has also been submitted as part of a godot-demo-projects PR:
Improve 2d/physics_tests for debugging and review #1326

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with godot-demo-projects/2d/physics_tests/, run the Functional tests → Solver → Bodies in Bucket scene, and reproduce the instability as the bucket overflows. Vary the bias and other physics settings as described, then compare the solver’s behavior against the reported stability problem; done means the crowded-body simulation no longer becomes explosive under pressure.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.