Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RayCast2D fails to collide if body is inside a CanvasLayer #342

Open
jamesresend opened this issue Feb 12, 2025 · 4 comments
Open

RayCast2D fails to collide if body is inside a CanvasLayer #342

jamesresend opened this issue Feb 12, 2025 · 4 comments
Labels
bug Something isn't working

Comments

@jamesresend
Copy link

jamesresend commented Feb 12, 2025

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.

recording.mp4

Image

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)

mvp.zip

@jamesresend jamesresend added the bug Something isn't working label Feb 12, 2025
@Ughuuu
Copy link
Contributor

Ughuuu commented Feb 12, 2025

Try with latest master build also and let me know if it happens.

@jamesresend
Copy link
Author

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"

recording_2.mp4

@jamesresend
Copy link
Author

jamesresend commented Feb 13, 2025

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"
rec3.mp4

mvp2.zip

EDIT: Also tested intersect_shape() and it doesn't work.

Thank you.

@JagersEgo
Copy link

I had the same thing and I though I was going crazy ty for reporting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants