Area2D doesn't respect collision layers
Closed this issue · 1 comments
Area2D node detects physics bodies on any collision layer, regardless of collision mask
To Reproduce
Steps to reproduce the behavior:
- Overlap an Area2D with any physics body with the Area2D collision mask and the physics collisions layer being mutually exclusive.
Output using Godot default physics:
Godot v4.3.beta1 - Windows 10.0.19045 - Vulkan (Mobile) - dedicated NVIDIA GeForce RTX 3080 (NVIDIA; 31.0.15.4601) - AMD Ryzen 5 5600X 6-Core Processor (12 Threads)
- SIMD and non-SIMD
Investigated this, and rapier doesn't as of now support the exact same kind of filtering that godot supports. Will document this better, and see if i'll open a bug or ask for a request on rapier side to see if this can be improved.
As per their documentation, they do:
https://rapier.rs/docs/user_guides/javascript/colliders/#collision-groups-and-solver-groups
if body A is in layer that B mask looks for and B is in layer that A mask looks for, it's collision, if not it's not. They don't support asymetric collisions. Or at least not sure right now about it.
Leaving this answer here, documenting it as a limitation and closing this issue for now.