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

Incorrect ShapeCast2D behavior against CollisionPolygon2D with build_mode = BUILD_SEGMENTS #88222

Closed
Pizzaandy opened this issue Feb 11, 2024 · 1 comment · Fixed by #88282
Closed

Comments

@Pizzaandy
Copy link

Pizzaandy commented Feb 11, 2024

Tested versions

Reproducible in:
v4.2.1.stable.mono.official [b09f793]
v4.3.dev3.mono.official [36e943b]

System information

Godot v4.2.1.stable.mono - Windows 10.0.19045 - GLES3 (Compatibility) - NVIDIA GeForce RTX 3070 (NVIDIA; 31.0.15.4665) - AMD Ryzen 7 3700X 8-Core Processor (16 Threads)

Issue description

The ShapeCast2D node does not behave correctly against CollisionPolygon2Ds built with segments.
This bug occurs regardless of the shape used in ShapeCast2D.

This may be related to #87347, as I have also noticed test_body_motion in CharacterBody2D failing to detect collisions with corners on segments. cast_motion and test_body_motion appear to share similar logic. I will open another issue for this.

ShapeCastAgainstSegments.mp4

Steps to reproduce

  1. Enable Debug -> Visible Collision Shapes
  2. Run the MRP and move the mouse towards each CollisionPolygon2D
  3. Observe the difference between Solids and Segments

Minimal reproduction project (MRP)

MRP_SegmentsCollisionError.zip

@Pizzaandy
Copy link
Author

May be related to #88227

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants