From c5c8a4ba5bd623a0f675c0d0c7c9d99b357adef2 Mon Sep 17 00:00:00 2001 From: Franklin Date: Thu, 23 Nov 2023 10:43:57 -0400 Subject: [PATCH] Fixed gimball lock and all rotations work great now --- src/logic/core/player/camera_player_sync.rs | 114 ++++++++++---------- 1 file changed, 55 insertions(+), 59 deletions(-) diff --git a/src/logic/core/player/camera_player_sync.rs b/src/logic/core/player/camera_player_sync.rs index ed82fa1..08f642b 100644 --- a/src/logic/core/player/camera_player_sync.rs +++ b/src/logic/core/player/camera_player_sync.rs @@ -2,7 +2,7 @@ use bevy::{input::mouse::MouseMotion, prelude::*, window::CursorGrabMode}; //use bevy_rapier3d::prelude::*; use crate::{ - comps::core::markers::{camera::MainCamera, player::Player}, + comps::core::markers::{camera::MainCamera, player::Player, proxy::{physics::utils::F32Ext, character::player_character::PlayerCharacter}}, ui::game::game_ui_state::{GameUiState, GameUiWindow}, }; @@ -72,6 +72,7 @@ pub fn follow_cursor_with_camera( mut motions: EventReader, mut player_query: Query<&mut Transform, (With, Without)>, mut camera_query: Query<&mut Transform, (With, Without)>, + mut player_model_query: Query<&mut Transform, (With, Without, Without)>, keyboard_input: Res>, btn: Res>, time: Res