bevy
bevy copied to clipboard
Add Rounded box gizmos
Objective
- Implement rounded cuboids and rectangles, suggestion of #9400
Solution
- Added
Gizmos::rounded_cuboid,Gizmos::rounded_rectandGizmos::rounded_rect_2d. - All of these return builders that allow configuring of the corner/edge radius using
.corner_radius(...)or.edge_radius(...)as well as the line segments of each arc using.arc_segments(...).
Changelog
- Added a new
rounded_boxmodule tobevy_gizmoscontaining all of the above methods and builders. - Updated the examples
2d_gizmosand3d_gizmos
Additional information
The 3d example now looks like this:
And this is the updated 2d example showcasing negative corner radius: