RayCast2D fails to collide if body is inside a CanvasLayer
Describe the bug
RayCast2D fails to collide if body is inside a CanvasLayer
To Reproduce
1 - Raycast a body that is inside a CanvasLayer and the detection is missed.
https://github.com/user-attachments/assets/56a4ec6a-49db-4259-998b-02986fc56cd6
Expected behavior
With the default Godot physics this detection is possible.
Environment:
- OS: Windows 11 23H2
- Version: 0.8.8
- Godot Version: v4.3.stable.steam.77dcf97d8 | 4.4 beta 3
- Type: Slower Version - 2D
Example project(zip)
Try with latest master build also and let me know if it happens.
Try with latest master build also and let me know if it happens.
It still happens -> version="0.8.10" flavour="godot-rapier-2d-single-enhanced-determinism"
https://github.com/user-attachments/assets/97cf6904-cfbb-4f5d-beba-f44374d19e82
In my project I found another use case where CanvasLayer is messing up. A direct_space_state.intersect_ray() also breaks. But intersect_point() works fine.
- Godot Engine v4.3.stable.steam.77dcf97d8
- Rapier2D v0.8.10 "godot-rapier-2d-single-enhanced-determinism"
https://github.com/user-attachments/assets/eca9aeb5-07f7-4c46-938a-cf72adc095a6
EDIT: Also tested intersect_shape() and it doesn't work.
Thank you.
I had the same thing and I though I was going crazy ty for reporting
Fixed in https://github.com/appsinacup/godot-rapier-physics/pull/420.