Fixed collisions and added mouse locking
This commit is contained in:
parent
f1529d7e58
commit
da86c3a111
4 changed files with 282 additions and 199 deletions
BIN
data/player.rgs
BIN
data/player.rgs
Binary file not shown.
BIN
data/scene.rgs
BIN
data/scene.rgs
Binary file not shown.
|
@ -8,6 +8,7 @@ use fyrox::{
|
||||||
gui::message::UiMessage,
|
gui::message::UiMessage,
|
||||||
plugin::{Plugin, PluginContext, PluginRegistrationContext},
|
plugin::{Plugin, PluginContext, PluginRegistrationContext},
|
||||||
scene::Scene,
|
scene::Scene,
|
||||||
|
renderer::framework::core::log::Log,
|
||||||
};
|
};
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
|
@ -75,4 +76,14 @@ impl Plugin for Game {
|
||||||
) {
|
) {
|
||||||
self.scene = scene;
|
self.scene = scene;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn on_graphics_context_initialized(
|
||||||
|
&mut self,
|
||||||
|
#[allow(unused_variables)] context: PluginContext,
|
||||||
|
) {
|
||||||
|
let gfxctx = context.graphics_context.as_initialized_mut();
|
||||||
|
|
||||||
|
gfxctx.window.set_cursor_visible(false);
|
||||||
|
Log::verify(gfxctx.window.set_cursor_grab(fyrox::window::CursorGrabMode::Confined));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
470
settings.ron
470
settings.ron
|
@ -489,6 +489,272 @@
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
scene_settings: {
|
scene_settings: {
|
||||||
|
"data/scene.rgs": (
|
||||||
|
camera_settings: (
|
||||||
|
position: (-11.366306, -7.537056, 6.83859),
|
||||||
|
yaw: 11.549961,
|
||||||
|
pitch: 0.46432278,
|
||||||
|
projection: Perspective((
|
||||||
|
fov: 1.3089969,
|
||||||
|
z_near: 0.025,
|
||||||
|
z_far: 128.0,
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
node_infos: {
|
||||||
|
(
|
||||||
|
index: 95,
|
||||||
|
generation: 1,
|
||||||
|
): (
|
||||||
|
is_expanded: true,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
index: 97,
|
||||||
|
generation: 1,
|
||||||
|
): (
|
||||||
|
is_expanded: true,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
index: 139,
|
||||||
|
generation: 2,
|
||||||
|
): (
|
||||||
|
is_expanded: true,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
index: 94,
|
||||||
|
generation: 1,
|
||||||
|
): (
|
||||||
|
is_expanded: true,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
index: 1,
|
||||||
|
generation: 1,
|
||||||
|
): (
|
||||||
|
is_expanded: true,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
index: 51,
|
||||||
|
generation: 1,
|
||||||
|
): (
|
||||||
|
is_expanded: true,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
index: 187,
|
||||||
|
generation: 1,
|
||||||
|
): (
|
||||||
|
is_expanded: true,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
index: 140,
|
||||||
|
generation: 1,
|
||||||
|
): (
|
||||||
|
is_expanded: true,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
index: 50,
|
||||||
|
generation: 1,
|
||||||
|
): (
|
||||||
|
is_expanded: true,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
index: 54,
|
||||||
|
generation: 1,
|
||||||
|
): (
|
||||||
|
is_expanded: true,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
index: 45,
|
||||||
|
generation: 1,
|
||||||
|
): (
|
||||||
|
is_expanded: true,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
index: 56,
|
||||||
|
generation: 1,
|
||||||
|
): (
|
||||||
|
is_expanded: true,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
index: 69,
|
||||||
|
generation: 1,
|
||||||
|
): (
|
||||||
|
is_expanded: true,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
index: 6,
|
||||||
|
generation: 1,
|
||||||
|
): (
|
||||||
|
is_expanded: true,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
index: 47,
|
||||||
|
generation: 2,
|
||||||
|
): (
|
||||||
|
is_expanded: true,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
index: 2,
|
||||||
|
generation: 1,
|
||||||
|
): (
|
||||||
|
is_expanded: true,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
index: 4,
|
||||||
|
generation: 1,
|
||||||
|
): (
|
||||||
|
is_expanded: true,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
index: 181,
|
||||||
|
generation: 1,
|
||||||
|
): (
|
||||||
|
is_expanded: true,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
index: 138,
|
||||||
|
generation: 2,
|
||||||
|
): (
|
||||||
|
is_expanded: true,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
index: 48,
|
||||||
|
generation: 1,
|
||||||
|
): (
|
||||||
|
is_expanded: true,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
index: 102,
|
||||||
|
generation: 1,
|
||||||
|
): (
|
||||||
|
is_expanded: true,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
index: 0,
|
||||||
|
generation: 1,
|
||||||
|
): (
|
||||||
|
is_expanded: true,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
index: 109,
|
||||||
|
generation: 1,
|
||||||
|
): (
|
||||||
|
is_expanded: true,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
index: 3,
|
||||||
|
generation: 1,
|
||||||
|
): (
|
||||||
|
is_expanded: true,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
index: 5,
|
||||||
|
generation: 1,
|
||||||
|
): (
|
||||||
|
is_expanded: true,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
index: 107,
|
||||||
|
generation: 1,
|
||||||
|
): (
|
||||||
|
is_expanded: true,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
index: 190,
|
||||||
|
generation: 2,
|
||||||
|
): (
|
||||||
|
is_expanded: true,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
index: 186,
|
||||||
|
generation: 1,
|
||||||
|
): (
|
||||||
|
is_expanded: true,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
index: 180,
|
||||||
|
generation: 1,
|
||||||
|
): (
|
||||||
|
is_expanded: true,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
index: 47,
|
||||||
|
generation: 1,
|
||||||
|
): (
|
||||||
|
is_expanded: true,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
index: 193,
|
||||||
|
generation: 2,
|
||||||
|
): (
|
||||||
|
is_expanded: true,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
index: 53,
|
||||||
|
generation: 1,
|
||||||
|
): (
|
||||||
|
is_expanded: true,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
index: 52,
|
||||||
|
generation: 1,
|
||||||
|
): (
|
||||||
|
is_expanded: true,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
index: 7,
|
||||||
|
generation: 1,
|
||||||
|
): (
|
||||||
|
is_expanded: true,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
index: 182,
|
||||||
|
generation: 1,
|
||||||
|
): (
|
||||||
|
is_expanded: true,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
index: 185,
|
||||||
|
generation: 1,
|
||||||
|
): (
|
||||||
|
is_expanded: true,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
index: 49,
|
||||||
|
generation: 1,
|
||||||
|
): (
|
||||||
|
is_expanded: true,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
index: 110,
|
||||||
|
generation: 1,
|
||||||
|
): (
|
||||||
|
is_expanded: true,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
index: 46,
|
||||||
|
generation: 1,
|
||||||
|
): (
|
||||||
|
is_expanded: true,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
index: 82,
|
||||||
|
generation: 1,
|
||||||
|
): (
|
||||||
|
is_expanded: true,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
index: 8,
|
||||||
|
generation: 1,
|
||||||
|
): (
|
||||||
|
is_expanded: true,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
index: 57,
|
||||||
|
generation: 1,
|
||||||
|
): (
|
||||||
|
is_expanded: true,
|
||||||
|
),
|
||||||
|
},
|
||||||
|
),
|
||||||
"/home/secondbeam/workspace/rust/fyrox/red_dragon_pon/data/guns/placeholder.ui": (
|
"/home/secondbeam/workspace/rust/fyrox/red_dragon_pon/data/guns/placeholder.ui": (
|
||||||
camera_settings: (
|
camera_settings: (
|
||||||
position: (0.0, 1.0, 0.0),
|
position: (0.0, 1.0, 0.0),
|
||||||
|
@ -530,9 +796,9 @@
|
||||||
),
|
),
|
||||||
"data/player.rgs": (
|
"data/player.rgs": (
|
||||||
camera_settings: (
|
camera_settings: (
|
||||||
position: (0.0, 1.0, 0.0),
|
position: (-2.509219, 0.8766233, 0.08671797),
|
||||||
yaw: 0.0,
|
yaw: 1.4641014,
|
||||||
pitch: 0.0,
|
pitch: 0.121562436,
|
||||||
projection: Perspective((
|
projection: Perspective((
|
||||||
fov: 1.3089969,
|
fov: 1.3089969,
|
||||||
z_near: 0.025,
|
z_near: 0.025,
|
||||||
|
@ -540,158 +806,12 @@
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
node_infos: {
|
node_infos: {
|
||||||
(
|
|
||||||
index: 2,
|
|
||||||
generation: 1,
|
|
||||||
): (
|
|
||||||
is_expanded: true,
|
|
||||||
),
|
|
||||||
(
|
|
||||||
index: 1,
|
|
||||||
generation: 1,
|
|
||||||
): (
|
|
||||||
is_expanded: true,
|
|
||||||
),
|
|
||||||
(
|
(
|
||||||
index: 0,
|
index: 0,
|
||||||
generation: 1,
|
generation: 1,
|
||||||
): (
|
): (
|
||||||
is_expanded: true,
|
is_expanded: true,
|
||||||
),
|
),
|
||||||
},
|
|
||||||
),
|
|
||||||
"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,
|
index: 2,
|
||||||
generation: 1,
|
generation: 1,
|
||||||
|
@ -699,55 +819,7 @@
|
||||||
is_expanded: true,
|
is_expanded: true,
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
index: 45,
|
index: 1,
|
||||||
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,
|
generation: 1,
|
||||||
): (
|
): (
|
||||||
is_expanded: true,
|
is_expanded: true,
|
||||||
|
@ -764,7 +836,7 @@
|
||||||
),
|
),
|
||||||
windows: (
|
windows: (
|
||||||
window_position: (0.0, 0.0),
|
window_position: (0.0, 0.0),
|
||||||
window_size: (1896.0, 1024.0),
|
window_size: (483.0, 1024.0),
|
||||||
window_maximized: false,
|
window_maximized: false,
|
||||||
layout: None,
|
layout: None,
|
||||||
),
|
),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue