From 1daae3e5c651b0f5cadc96ab9cf0cb8bd29f3910 Mon Sep 17 00:00:00 2001 From: Joe Ardent Date: Sat, 29 Mar 2025 13:31:30 -0700 Subject: [PATCH] fix lean calc --- src/input.rs | 2 +- src/physics.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/input.rs b/src/input.rs index 3305a5a..7635692 100644 --- a/src/input.rs +++ b/src/input.rs @@ -46,6 +46,6 @@ pub struct CyberInputPlugin; impl Plugin for CyberInputPlugin { fn build(&self, app: &mut App) { app.init_resource::() - .add_systems(Update, (update_input)); + .add_systems(Update, update_input); } } diff --git a/src/physics.rs b/src/physics.rs index 6a4ba5e..aa48da5 100644 --- a/src/physics.rs +++ b/src/physics.rs @@ -98,7 +98,7 @@ mod systems { let tan_theta = (v2_r / gravity).clamp(-FRAC_PI_3, FRAC_PI_3); if tan_theta.is_normal() { - lean.lean = -tan_theta.atan().clamp(-FRAC_PI_3, FRAC_PI_3); + lean.lean = tan_theta.atan().clamp(-FRAC_PI_3, FRAC_PI_3); } else { //lean.lean = 0.0; }