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

Fix concave CollisionPolygon2D debug drawing and docs #89820

Merged
merged 1 commit into from
Mar 26, 2024

Conversation

rburing
Copy link
Member

@rburing rburing commented Mar 23, 2024

The debug drawing for CollisionPolygon2D showed the convex decomposition unconditionally, which was meaningless in Segments build mode. The dead code would show a filled polygon, which would also be misleading as you can just as well put a character on the inside (because the shape is purely built of segments), so this PR draws nothing on the inside when the build mode is Segments. (If people do prefer a filled polygon, we could do that instead.)

collisionpolygon2d-debug.mp4

The documentation had some copy/paste error from the 3D analogue, and it was mentioning only the solid option; now hollow is mentioned as well.

@rburing
Copy link
Member Author

rburing commented Mar 24, 2024

The empty inside would be consistent with ConcavePolygonShape2D.

@Chaosus Chaosus added this to the 4.3 milestone Mar 24, 2024
@akien-mga akien-mga merged commit a0d464a into godotengine:master Mar 26, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@rburing rburing deleted the concave_collision_polygon_2d branch April 6, 2024 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Segment based polygon shapes only get collisions on edges
4 participants