-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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 Gizmo to display 3D custom AABB #89538
Add Gizmo to display 3D custom AABB #89538
Conversation
editor/plugins/gizmos/mesh_instance_3d_custom_aab_gizmo_plugin.h
Outdated
Show resolved
Hide resolved
editor/plugins/gizmos/mesh_instance_3d_custom_aab_gizmo_plugin.cpp
Outdated
Show resolved
Hide resolved
editor/plugins/gizmos/mesh_instance_3d_custom_aab_gizmo_plugin.cpp
Outdated
Show resolved
Hide resolved
dfeffec
to
045489b
Compare
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 (rebased on top of master
a7b8602), there are issues with the gizmo shape not being updated when you change the Custom AABB property in the editor:
simplescreenrecorder-2024-04-09_18.38.56.mp4
The gizmo only updates if the mesh resource is changed or if you deselect and reselect the node.
The error message spam when changing Custom AABB if no mesh is assigned also applies to master
, so it's not specific to this PR: #86369 (comment)
Yes but I think this is the limitation of the gizmo. I don't really know how to make it update automatically. |
You can force a gizmo update when the property is changed by calling godot/scene/3d/visual_instance_3d.cpp Lines 374 to 380 in 6c57928
|
Thanks for the tip! |
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 (rebased on top of master
3b18061), it works as expected.
Note to others: The gizmo is only displayed when the node is selected, so it won't be too intrusive in complex 3D scenes.
editor/plugins/gizmos/mesh_instance_3d_custom_aabb_gizmo_plugin.cpp
Outdated
Show resolved
Hide resolved
editor/plugins/gizmos/mesh_instance_3d_custom_aabb_gizmo_plugin.cpp
Outdated
Show resolved
Hide resolved
editor/plugins/gizmos/mesh_instance_3d_custom_aabb_gizmo_plugin.cpp
Outdated
Show resolved
Hide resolved
editor/plugins/gizmos/mesh_instance_3d_custom_aabb_gizmo_plugin.h
Outdated
Show resolved
Hide resolved
c6ab16d
to
fff8ed6
Compare
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.
Looks great to me! I just left a suggestion to fill in the docs. We like to have documentation whenever we add a new feature.
The final step before merging is to squash all the commits together so that the whole PR only contains 1 big commit with all your changes. We like to merge one commit at a time to keep the git history clean and navigable.
If you don't know how to do that, we have a helpful tutorial in the official documentation https://docs.godotengine.org/en/latest/community/contributing/pr_workflow.html#the-interactive-rebase
75a8d05
to
a454c87
Compare
a454c87
to
8caa1b8
Compare
Thanks! |
This PR adds the ability to preview the custom AABB of a MeshInstance3D inside the editor.