mirror of
https://github.com/bevyengine/bevy
synced 2024-11-23 05:03:47 +00:00
ab300d0ed9
## Objective - Add an arrow gizmo as suggested by #9400 ## Solution (excuse my Protomen music) https://github.com/bevyengine/bevy/assets/14184826/192adf24-079f-4a4b-a17b-091e892974ec Wasn't horribly hard when i remembered i can change coordinate systems whenever I want. Gave them four tips (as suggested by @alice-i-cecile in discord) instead of trying to decide what direction the tips should point. Made the tip length default to 1/10 of the arrow's length, which looked good enough to me. Hard-coded the angle from the body to the tips to 45 degrees. ## Still TODO - [x] actual doc comments - [x] doctests - [x] `ArrowBuilder.with_tip_length()` --- ## Changelog - Added `gizmos.arrow()` and `gizmos.arrow_2d()` - Added arrows to `2d_gizmos` and `3d_gizmos` examples ## Migration Guide N/A --------- Co-authored-by: Nicola Papale <nicopap@users.noreply.github.com> |
||
---|---|---|
.. | ||
arrows.rs | ||
gizmos.rs | ||
lib.rs | ||
lines.wgsl | ||
pipeline_2d.rs | ||
pipeline_3d.rs |