use bevy::prelude::*; use bevy_polyline::prelude::*; fn main() { App::new() .add_plugins(DefaultPlugins) .add_plugins(PolylinePlugin) .add_systems(Startup, setup) .add_systems(Update, (move_camera, toggle_perspective)) .run(); } fn setup( mut commands: Commands, mut polyline_materials: ResMut>, mut polylines: ResMut>, ) { commands.spawn(PolylineBundle { polyline: polylines.add(Polyline { vertices: vec![-Vec3::ONE, Vec3::ONE], }), material: polyline_materials.add(PolylineMaterial { width: 10.0, color: Color::RED, perspective: true, ..default() }), ..default() }); // camera commands.spawn(Camera3dBundle { transform: Transform::from_xyz(0.0, 0.0, 2.0).looking_at(Vec3::ZERO, Vec3::Y), camera: Camera { hdr: true, ..default() }, ..default() }); } fn move_camera( mut q: Query<&mut Transform, With>, keyboard_input: Res>, time: Res