use bevy::prelude::*; use bevy_flycam::prelude::*; //From bevy examples: //https://github.com/bevyengine/bevy/blob/latest/examples/3d/3d_scene.rs fn main() { App::new() .add_plugins(DefaultPlugins) .add_plugins(PlayerPlugin) .insert_resource(MovementSettings { sensitivity: 0.00015, // default: 0.00012 speed: 12.0, // default: 12.0 }) // Unreal movement layout .insert_resource(KeyBindings { move_ascend: KeyCode::KeyE, move_descend: KeyCode::KeyQ, ..Default::default() }) .add_systems(Startup, setup) .run(); } /// set up a simple 3D scene fn setup( mut commands: Commands, mut meshes: ResMut>, mut materials: ResMut>, ) { // plane commands.spawn(( Mesh3d(meshes.add(Plane3d::new(Vec3::Y, Vec2::splat(2.5)))), MeshMaterial3d(materials.add(Color::srgb(0.3, 0.5, 0.3))), )); // cube commands.spawn(( Mesh3d(meshes.add(Cuboid::new(1.0, 1.0, 1.0))), MeshMaterial3d(materials.add(Color::srgb(0.8, 0.7, 0.6))), Transform::from_xyz(0.0, 0.5, 0.0), )); // light commands.spawn((PointLight::default(), Transform::from_xyz(4.0, 8.0, 4.0))); }