From 5378aef653ae95aa51d4d65ed5ea583106148ac6 Mon Sep 17 00:00:00 2001 From: Joe Ardent Date: Sun, 19 Feb 2023 21:21:07 -0800 Subject: [PATCH] checkpoint adding lean mod to cat system --- src/action/systems.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/action/systems.rs b/src/action/systems.rs index e36dc74..9b5703f 100644 --- a/src/action/systems.rs +++ b/src/action/systems.rs @@ -2,7 +2,9 @@ use std::f32::consts::PI; #[cfg(feature = "inspector")] use std::time::Instant; -use bevy::prelude::{Commands, Entity, Query, Res, ResMut, Time, Transform, Vec3, With, Without}; +use bevy::prelude::{ + Commands, Entity, Quat, Query, Res, ResMut, Time, Transform, Vec3, With, Without, +}; use bevy_rapier3d::prelude::{ CollisionGroups, ExternalForce, Group, MultibodyJoint, QueryFilter, RapierConfiguration, RapierContext, ReadMassProperties, Velocity, @@ -10,7 +12,7 @@ use bevy_rapier3d::prelude::{ #[cfg(feature = "inspector")] use super::ActionDebugInstant; -use super::{CatControllerSettings, CatControllerState, MovementSettings, Tunneling}; +use super::{CatControllerSettings, CatControllerState, CyberLean, MovementSettings, Tunneling}; use crate::{ bike::{CyberBikeBody, CyberSteering, CyberWheel, BIKE_WHEEL_COLLISION_GROUP}, input::InputState, @@ -35,10 +37,13 @@ pub(super) fn falling_cat( mut bike_query: Query<(&Transform, &mut ExternalForce, &mut CatControllerState)>, time: Res