bevy/crates/bevy_gizmos/src
Connor King ab300d0ed9
Gizmo Arrows (#10550)
## 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>
2023-11-15 14:19:15 +00:00
..
arrows.rs Gizmo Arrows (#10550) 2023-11-15 14:19:15 +00:00
gizmos.rs Updates for rust 1.73 (#10035) 2023-10-06 00:31:10 +00:00
lib.rs Gizmo Arrows (#10550) 2023-11-15 14:19:15 +00:00
lines.wgsl Fix float precision issue in the gizmo shader (#10408) 2023-11-14 22:36:02 +00:00
pipeline_2d.rs Automatic batching/instancing of draw commands (#9685) 2023-09-21 22:12:34 +00:00
pipeline_3d.rs Fix gizmo crash when prepass enabled (#10360) 2023-11-03 23:38:50 +00:00