Crate bevy_mod_gizmos
source ·Expand description
Examples
Draw a single gizmo
draw_gizmo(
Gizmo::new(Vec3::ZERO, 1.0, Color::WHITE)
.on_click(|| println!("Clicked!"))
.on_hover(|| println!("Hovered")),
);
Draw multiple gizmos
draw_gizmos(vec![
Gizmo::new(Vec3::X, 0.5, Color::RED),
Gizmo::new(Vec3::Y, 0.5, Color::RED),
Gizmo::new(Vec3::Z, 0.5, Color::RED),
]);
Draw a line
draw_line(
vec![
Vec3::X,
Vec3::Y,
Vec3::Z,
],
Color::PURPLE,
);
The rest of the methods can be found here.
Structs
- A gizmo
- Add this to your main camera for interactable gizmos to function
- Add this to your bevy [
App
] for gizmos to function - A pixel wide lline
Functions
- Draw a closed line, it takes a vec of Vec3 points and a color
- Draw a single gizmo, it takes anything that implements
Into<Gizmo>
- Draw multiple gizmos, it takes a vec of anything that implements
Into<Gizmo>
- Draw multiple gizmos with a connecting line, it takes a vec of anything that implements
Into<Gizmo>
- Draw a line, it takes a vec of Vec3 points and a color