appsinacup/godot-rapier-physics

Game engine hangs in scene with StaticBody2D with a WorldBoundaryShape2D

TravisBarryDick opened this issue · 8 comments

Describe the bug
When using the Rapier2D in a scene containing a StaticBody2D with a CollisionShape2D whose shape property is set to a WorldBoundaryShape2D, the game hangs upon loading the scene.

To Reproduce

  1. Create a new Godot project.
  2. Install Rapier2D from the AssetLib and make it the physics engine for the project.
  3. Add a StaticBody2D with a CollisionShape2D child whose shape is set to WorldBoundaryShape2D
  4. Launch the scene.

Expected behavior
The game shouldn't hang / freeze.

Environment (please complete the following information):

  • OS: Mac OS
  • Version Sonoma 14.4.1
  • Godot Version v4.2.1.stable.official [b09f793f5[
  • Type SIMD

Example project(zip)
WorldBoundary2DHang.zip

Can confirm same issue on Windows 10, Godot 4.2.2.stable, using the same engine (Rapier2D with SIMD). Game just hangs on boot splash. No errors at all.

Thanks for the report, will investigate.

Oh my, it's because of the fluid pipeline. It seems that the world boundary being so big, it generates some weird shape or something when coupling with fluids.
I'll either temporarily disable world boundaries for fluids, or try to see why it happens.

I'll open an issue on salva repo for now and disabling world space for fluids.

Hm, looking at this, it might occur for bigger shapes too. Right now I register all shapes with fluid pipeline for all shapes using dynamic contact sampling. There should be a way for us to specify what objects should integrate with fluid pipeline and which not, but I also like the simplicity of now where it all just works. Hm.

Thank you for the quick fix! I was wondering if it had to do with the volume of the body, cool to confirm. Out of curiosity, is there an easy way to install the main branch version into my godot project?

Copy paste the addons folder into your project. Thats the only way, afaik.