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

Add static body creation equivalent for all collision shape sibling creations #86627

Conversation

ajreckof
Copy link
Member

Fix #86626

Just adds an option in the popup menu and handle it the same way it was handled for trimesh collision shapes

@ajreckof ajreckof requested a review from a team as a code owner December 30, 2023 05:43
@Chaosus Chaosus added this to the 4.3 milestone Dec 30, 2023
editor/plugins/mesh_instance_3d_editor_plugin.h Outdated Show resolved Hide resolved
editor/plugins/mesh_instance_3d_editor_plugin.cpp Outdated Show resolved Hide resolved
editor/plugins/mesh_instance_3d_editor_plugin.cpp Outdated Show resolved Hide resolved
editor/plugins/mesh_instance_3d_editor_plugin.cpp Outdated Show resolved Hide resolved
editor/plugins/mesh_instance_3d_editor_plugin.cpp Outdated Show resolved Hide resolved
editor/plugins/mesh_instance_3d_editor_plugin.cpp Outdated Show resolved Hide resolved
editor/plugins/mesh_instance_3d_editor_plugin.h Outdated Show resolved Hide resolved
@rburing rburing requested a review from a team December 30, 2023 11:06
@smix8
Copy link
Contributor

smix8 commented Dec 30, 2023

The duplicated menu option names need to be fixed.

menu

Imo instead of making the menu even more convoluted than it already is it should be moved to a submenu where users can change the currently hardcoded settings.

@ajreckof ajreckof force-pushed the add-static-body-creation-for-all-colision-shape-creations branch 4 times, most recently from 4746b74 to 98febff Compare January 3, 2024 01:00
@ajreckof
Copy link
Member Author

ajreckof commented Jan 3, 2024

I reworked it so that it is now in a submenu. On the side while reworking I ended up adding the posibility to add colision shape as sibling on a multi-selection too as it was previously only for static body child.
Here are a few screen shots of how it looked. Feel free to propose improvements:
Capture d’écran 2024-01-03 à 02 10 34
Capture d’écran 2024-01-03 à 02 10 41
Capture d’écran 2024-01-03 à 02 14 25

@ajreckof ajreckof force-pushed the add-static-body-creation-for-all-colision-shape-creations branch from 98febff to 58473b9 Compare March 21, 2024 19:32
@smix8
Copy link
Contributor

smix8 commented Apr 24, 2024

I tested with a build artifact from this PR and a simple 2x2x2 BoxMesh.

The "Static Body Child" options all work as expected and create StaticBody3D child node with a CollisionShape3D child node that has a ConvexPolygonShape3D resource.

Now what does not seem to work as expected are the "Sibling" options.

I would expect them to do the very same except for leaving out the StaticBody3D node and place the CollisionShape3D node as a sibling with the same ConvexPolygonShape3D resource as with the other options.

The node creation and placement works but not the Shape3D resource creation. Not sure why but the sibling options all created ConcavePolygonShape3D for everything no matter what convex menu option is picked. I would expect them to create the same shape as the other convex options that work.

@ajreckof ajreckof force-pushed the add-static-body-creation-for-all-colision-shape-creations branch from 58473b9 to fa12df6 Compare April 24, 2024 08:20
Copy link
Contributor

@smix8 smix8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seem to work as expected now. I did not encounter any more issues.

@akien-mga akien-mga changed the title Add static body creation equivalent for all collision shape sibling c… Add static body creation equivalent for all collision shape sibling creations Apr 25, 2024
… all static body options

Apply suggestions from code review

Co-Authored-By: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
@ajreckof ajreckof force-pushed the add-static-body-creation-for-all-colision-shape-creations branch from e49a261 to b84f66c Compare April 25, 2024 13:36
@akien-mga akien-mga merged commit 5a14db7 into godotengine:master Apr 25, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

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.

Can't create static body for something else then trimesh collisions
5 participants