diff --git a/.gitignore b/.gitignore index 593ecb8..170bfb2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /target *.log +history.bin diff --git a/assets/models/red dragon room.fbx.options b/assets/models/red dragon room.fbx.options new file mode 100644 index 0000000..7c7e900 --- /dev/null +++ b/assets/models/red dragon room.fbx.options @@ -0,0 +1,3 @@ +( + material_search_options: UsePathDirectly, +) \ No newline at end of file diff --git a/assets/ui/guns/placeholder/static.png b/assets/ui/guns/placeholder/static.png new file mode 100644 index 0000000..5b92e6c Binary files /dev/null and b/assets/ui/guns/placeholder/static.png differ diff --git a/data/guns/placeholder.ui b/data/guns/placeholder.ui new file mode 100644 index 0000000..e92a133 Binary files /dev/null and b/data/guns/placeholder.ui differ diff --git a/data/scene.rgs b/data/scene.rgs index 9bb1c4d..1e71508 100644 Binary files a/data/scene.rgs and b/data/scene.rgs differ diff --git a/game/src/player.rs b/game/src/player.rs index 4f80bf5..0e40853 100644 --- a/game/src/player.rs +++ b/game/src/player.rs @@ -30,6 +30,9 @@ pub struct Player { #[reflect(hidden)] move_right: bool, + #[reflect(hidden)] + reset_position: bool, + #[reflect(hidden)] yaw: f32, @@ -85,6 +88,9 @@ impl ScriptTrait for Player { KeyCode::KeyD => { self.move_right = is_pressed; }, + KeyCode::F1 => { + self.reset_position = is_pressed; + }, _ => (), } } @@ -114,6 +120,12 @@ impl ScriptTrait for Player { } if let Some(rigid_body) = context.scene.graph.try_get_mut_of_type::(context.handle) { + + if self.reset_position { + rigid_body.local_transform_mut().set_position(Vector3::new(0.0, 0.0, 0.0)); + return; + } + let mut velocity = Vector3::new(0.0, 0.0, 0.0); if self.move_forward { velocity += look_vector; diff --git a/settings.ron b/settings.ron index c8bc9a9..a844585 100644 --- a/settings.ron +++ b/settings.ron @@ -489,50 +489,26 @@ ), ), scene_settings: { - "data/scene.rgs": ( + "/home/secondbeam/workspace/rust/fyrox/red_dragon_pon/data/guns/placeholder.ui": ( camera_settings: ( - position: (0.6421091, 0.11491381, 1.7991738), - yaw: 4.735702, - pitch: 0.11656319, + position: (0.0, 1.0, 0.0), + yaw: 0.0, + pitch: 0.0, projection: Perspective(( fov: 1.3089969, z_near: 0.025, - z_far: 128.0, + z_far: 2048.0, )), ), node_infos: { ( - index: 45, + index: 0, generation: 1, ): ( is_expanded: true, ), ( - index: 2, - generation: 1, - ): ( - is_expanded: true, - ), - ( - index: 3, - generation: 1, - ): ( - is_expanded: true, - ), - ( - index: 46, - generation: 1, - ): ( - is_expanded: true, - ), - ( - index: 1, - generation: 1, - ): ( - is_expanded: true, - ), - ( - index: 69, + index: 5, generation: 1, ): ( is_expanded: true, @@ -564,6 +540,12 @@ )), ), node_infos: { + ( + index: 2, + generation: 1, + ): ( + is_expanded: true, + ), ( index: 1, generation: 1, @@ -578,16 +560,211 @@ ), }, ), + "data/scene.rgs": ( + camera_settings: ( + position: (0.0, 0.0, 0.0), + yaw: 7.867303, + pitch: 0.41450697, + projection: Perspective(( + fov: 1.3089969, + z_near: 0.025, + z_far: 128.0, + )), + ), + node_infos: { + ( + index: 3, + generation: 1, + ): ( + is_expanded: false, + ), + ( + index: 140, + generation: 1, + ): ( + is_expanded: true, + ), + ( + index: 0, + generation: 1, + ): ( + is_expanded: true, + ), + ( + index: 180, + generation: 1, + ): ( + is_expanded: true, + ), + ( + index: 1, + generation: 1, + ): ( + is_expanded: true, + ), + ( + index: 49, + generation: 1, + ): ( + is_expanded: true, + ), + ( + index: 181, + generation: 1, + ): ( + is_expanded: true, + ), + ( + index: 5, + generation: 1, + ): ( + is_expanded: true, + ), + ( + index: 53, + generation: 1, + ): ( + is_expanded: true, + ), + ( + index: 51, + generation: 1, + ): ( + is_expanded: true, + ), + ( + index: 182, + generation: 1, + ): ( + is_expanded: true, + ), + ( + index: 139, + generation: 2, + ): ( + is_expanded: true, + ), + ( + index: 138, + generation: 2, + ): ( + is_expanded: true, + ), + ( + index: 69, + generation: 1, + ): ( + is_expanded: true, + ), + ( + index: 47, + generation: 1, + ): ( + is_expanded: true, + ), + ( + index: 97, + generation: 1, + ): ( + is_expanded: true, + ), + ( + index: 52, + generation: 1, + ): ( + is_expanded: true, + ), + ( + index: 46, + generation: 1, + ): ( + is_expanded: true, + ), + ( + index: 56, + generation: 1, + ): ( + is_expanded: true, + ), + ( + index: 102, + generation: 1, + ): ( + is_expanded: true, + ), + ( + index: 2, + generation: 1, + ): ( + is_expanded: true, + ), + ( + index: 45, + generation: 1, + ): ( + is_expanded: true, + ), + ( + index: 6, + generation: 1, + ): ( + is_expanded: true, + ), + ( + index: 57, + generation: 1, + ): ( + is_expanded: true, + ), + ( + index: 110, + generation: 1, + ): ( + is_expanded: true, + ), + ( + index: 50, + generation: 1, + ): ( + is_expanded: true, + ), + ( + index: 109, + generation: 1, + ): ( + is_expanded: true, + ), + ( + index: 4, + generation: 1, + ): ( + is_expanded: true, + ), + ( + index: 48, + generation: 1, + ): ( + is_expanded: true, + ), + ( + index: 54, + generation: 1, + ): ( + is_expanded: true, + ), + }, + ), }, recent: ( scenes: [ + "data/guns/placeholder.ui", "data/player.rgs", "data/scene.rgs", ], ), windows: ( window_position: (0.0, 0.0), - window_size: (1093.0, 505.0), + window_size: (1896.0, 1024.0), window_maximized: false, layout: None, ),