This commit is contained in:
Joe Ardent 2024-12-15 13:29:37 -08:00
parent 2358d53b7a
commit c03779aa62
2 changed files with 15 additions and 4 deletions

View file

@ -1,5 +1,16 @@
use avian3d::prelude::*; use avian3d::prelude::{
use bevy::{self, color::palettes::css::SILVER, 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; use bevy_inspector_egui::quick::WorldInspectorPlugin;
mod bike; mod bike;

View file

@ -65,7 +65,7 @@ impl CatControllerState {
} }
mod systems { mod systems {
use std::f32::consts::{FRAC_PI_3, FRAC_PI_4}; use std::f32::consts::FRAC_PI_3;
use avian3d::prelude::*; use avian3d::prelude::*;
use bevy::prelude::*; use bevy::prelude::*;
@ -74,7 +74,7 @@ mod systems {
use crate::bike::CyberBikeBody; use crate::bike::CyberBikeBody;
fn _yaw_to_angle(yaw: f32) -> f32 { 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() { if v.is_normal() {
v v
} else { } else {