From c03779aa625a658a2886956cda14f90650fe346c Mon Sep 17 00:00:00 2001 From: Joe Ardent Date: Sun, 15 Dec 2024 13:29:37 -0800 Subject: [PATCH] tidy --- src/main.rs | 15 +++++++++++++-- src/physics.rs | 4 ++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index e766fec..8f0d4b0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,16 @@ -use avian3d::prelude::*; -use bevy::{self, color::palettes::css::SILVER, prelude::*}; +use avian3d::prelude::{ + Collider, ColliderDensity, CollisionMargin, Friction, PhysicsGizmos, RigidBody, +}; +use bevy::{ + self, + color::palettes::css::SILVER, + prelude::{ + default, App, AppGizmoBuilder, Assets, BuildChildren, ButtonInput, Color, Commands, + DefaultPlugins, Entity, GizmoConfig, KeyCode, Mesh, Meshable, PbrBundle, Plane3d, + PointLight, PointLightBundle, Query, Res, ResMut, SpatialBundle, Srgba, StandardMaterial, + Startup, Transform, Update, Vec3, Window, + }, +}; use bevy_inspector_egui::quick::WorldInspectorPlugin; mod bike; diff --git a/src/physics.rs b/src/physics.rs index 030d38d..eb58f0b 100644 --- a/src/physics.rs +++ b/src/physics.rs @@ -65,7 +65,7 @@ impl CatControllerState { } mod systems { - use std::f32::consts::{FRAC_PI_3, FRAC_PI_4}; + use std::f32::consts::FRAC_PI_3; use avian3d::prelude::*; use bevy::prelude::*; @@ -74,7 +74,7 @@ mod systems { use crate::bike::CyberBikeBody; fn _yaw_to_angle(yaw: f32) -> f32 { - let v = yaw.powi(5) * FRAC_PI_4; + let v = yaw.powi(5) * FRAC_PI_3; if v.is_normal() { v } else {