From 7edca9d472288f6aacb782f0fd3fed227a591edb Mon Sep 17 00:00:00 2001 From: hheik <4469778+hheik@users.noreply.github.com> Date: Mon, 19 Dec 2022 16:00:40 +0200 Subject: [PATCH] wip: formatting and some debugging stuff --- src/game.rs | 8 +++++--- src/game/player.rs | 12 ++++-------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/game.rs b/src/game.rs index f747b91..921c6a9 100644 --- a/src/game.rs +++ b/src/game.rs @@ -8,14 +8,15 @@ use crate::{ use self::{ camera::{GameCameraPlugin, WORLD_WIDTH}, + debug::DebugPlugin, kinematic::KinematicPlugin, - player::PlayerPlugin, debug::DebugPlugin, + player::PlayerPlugin, }; pub mod camera; +pub mod debug; pub mod kinematic; pub mod player; -pub mod debug; pub fn init() { App::new() @@ -33,7 +34,8 @@ pub fn init() { fn setup_window(mut windows: ResMut) { if let Some(window) = windows.get_primary_mut() { - window.set_resolution(1280.0 / 2.0, 720.0 / 2.0); + window.set_resolution(900.0, 450.0); + window.set_title("Kuilu".to_string()); } } diff --git a/src/game/player.rs b/src/game/player.rs index c3bcfa6..676bd9e 100644 --- a/src/game/player.rs +++ b/src/game/player.rs @@ -63,6 +63,10 @@ pub fn player_spawn(mut commands: Commands) { transform: TransformBundle::from_transform(Transform::from_translation(Vec3::new( 256.0, 128.0, 0.0, ))), + properties: KinematicProperties { + gravity: None, + ..default() + }, ..default() }; @@ -85,14 +89,6 @@ pub fn player_spawn(mut commands: Commands) { kinematic, ..default() }) - // .insert(RigidBody::KinematicPositionBased) - // .insert(Velocity::default()) - // .insert(GravityScale(1.0)) - // .insert(KinematicCharacterController { - // offset: CharacterLength::Absolute(0.01), - // up: Vec2::Y, - // ..default() - // }) .insert(KinematicInput::default()) .insert(Ccd::enabled()) .insert(Sleeping::disabled())