-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
Add debug colors and fills to CollisionPolygon3D. #101810
Add debug colors and fills to CollisionPolygon3D. #101810
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally, it works as expected. Code looks good to me.
Testing project: test_pr_101810.zip
It makes sense to merge this before 4.4 is released, so we have feature parity with other collision shapes and fix the original issue where they don't appear in the debug view.
Note that the visual representation between the editor and running project will differ slightly, as the running project will draw the triangulated version for the lines, while the editor will draw the shape that was drawn by the user (and may contain crossing sections). The filled area that is drawn is identical either way.
Editor (not selected)
Running project
This brings CollisionPolygon3D up to feature parity with its counterpart CollisionShape3D. Closes godotengine#101414. In addition, adding this feature fixes the issue that CollisionPolygon3D would never be rendered in exported builds, even if Visible Collision Shapes is enabled at runtime. Closes godotengine#101413.
0992846
to
a3ef9de
Compare
This is something I noticed, and I kind of prefer the way I drew it in the editor, since it looks much more like one singular solid. I didn't want to make drastic changes on a whim though, because this is intended to fix a regression and add feature parity between all collision types. If there is a consensus as to which method of drawing the polygons is preferred, I can try to match them both. |
Thanks! |
This pull request brings CollisionPolygon3D up to feature parity with its counterpart CollisionShape3D. Closes #101414.
In addition, adding this feature fixes the issue that CollisionPolygon3D would never be rendered in exported builds, even if Visible Collision Shapes is enabled at runtime. Closes #101413.