appsinacup / godot-rapier-physics

Godot Rapier Physics – A 2D and 3D drop-in replacement for the Godot engine that adds stability and fluids.
https://godot.rapier.rs
MIT License
348 stars 17 forks source link

Fix bodies filter method #152

Closed Ughuuu closed 2 months ago

Ughuuu commented 2 months ago

Only call filter and modify_contacts methods if needed. This should improve performance. Eg. filter is only needed if we have exclude_bodies. modify_contacts is only needed for case we have a static body that acts as a conveyer belt or for shapes with one way direction.