-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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 a bounding box gizmo #8468
Add a bounding box gizmo #8468
Conversation
Adding it to the scene_viewer is a great idea, but I think it would be nice as a standalone example too. Or maybe just use it in the gizmo example? |
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.
Yes please, this is very welcome. A future improvement could be to do the same with the Node
struct.
the difference between a bounding box and a cuboid is not clear enough, why do we need both? |
I've removed |
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.
Widely useful, if this existed earlier it would have saved me a few headaches.
I love the following function so much, I've definitively needed something similar in personal projects. Maybe it could be implemented as a bevy/crates/bevy_gizmos/src/lib.rs Lines 201 to 204 in 9e41e7a
|
Head branch was pushed to by a user without write access
Objective
Add a bounding box gizmo
Changes
AabbGizmo
component that will draw theAabb
component on that entity.GizmoConfig
resource.TransformPoint
trait to generalize over the point transformation methods on various transform types (e.gTransform
andGlobalTransform
).Gizmos::cuboid
method to accept animpl TransformPoint
instead of separate translation, rotation, and scale.