A multiplayer VR framework w/voice chat
1use bevy::prelude::*; 2 3pub mod debug_camera; 4 5pub fn setup( 6 mut commands: Commands, 7 mut meshes: ResMut<Assets<Mesh>>, 8 mut materials: ResMut<Assets<StandardMaterial>> 9){ 10 commands.spawn(( 11 Mesh3d(meshes.add(Cuboid::new(1.0, 1.0, 1.0))), 12 MeshMaterial3d(materials.add(Color::WHITE)), 13 Transform::from_xyz(5.0, 0.0, 0.0) 14 )); 15 16 commands.spawn(( 17 Mesh3d(meshes.add(Cuboid::new(0.5, 0.5, 0.5))), 18 MeshMaterial3d(materials.add(Color::WHITE)), 19 Transform::from_xyz(-5.0, 0.0, 0.0) 20 )); 21 22 commands.spawn(( 23 Mesh3d(meshes.add(Cuboid::new(0.5, 0.5, 0.5))), 24 MeshMaterial3d(materials.add(Color::WHITE)), 25 Transform::from_xyz(0.0, 0.0, 5.0) 26 )); 27 28 commands.spawn(( 29 Mesh3d(meshes.add(Cuboid::new(0.5, 0.5, 0.5))), 30 MeshMaterial3d(materials.add(Color::WHITE)), 31 Transform::from_xyz(0.0, 0.0, -5.0) 32 )); 33 34 commands.spawn(( 35 debug_camera::DebugCamera::default(), 36 Camera3d::default(), 37 Transform::from_xyz(0.0, 0.0, 0.0).looking_at(Vec3::ZERO, Vec3::Y), 38 )); 39}