From 9e45aef7e4af10299f6f75ac6f081ed013970836 Mon Sep 17 00:00:00 2001 From: Joe Ardent Date: Sat, 18 Feb 2023 19:46:18 -0800 Subject: [PATCH] checkpoint --- src/bike/body.rs | 2 +- src/bike/components.rs | 4 +--- src/main.rs | 5 ++++- src/planet.rs | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/bike/body.rs b/src/bike/body.rs index 4216915..29ea08c 100644 --- a/src/bike/body.rs +++ b/src/bike/body.rs @@ -16,7 +16,7 @@ pub(super) fn spawn_cyberbike( wheel_conf: Res, mut meshterials: Meshterial, ) { - let altitude = PLANET_RADIUS - 100.0; + let altitude = PLANET_RADIUS + 10.0; let mut xform = Transform::from_translation(Vec3::X * altitude) .with_rotation(Quat::from_axis_angle(Vec3::Z, -89.0f32.to_radians())); diff --git a/src/bike/components.rs b/src/bike/components.rs index 674f902..2514878 100644 --- a/src/bike/components.rs +++ b/src/bike/components.rs @@ -16,7 +16,6 @@ pub struct CyberWheel; #[reflect(Resource)] pub struct WheelConfig { pub front_forward: f32, - pub front_stance: f32, pub rear_back: f32, pub y: f32, pub limits: [f32; 2], @@ -30,8 +29,7 @@ pub struct WheelConfig { impl Default for WheelConfig { fn default() -> Self { Self { - front_forward: 0.9, - front_stance: 0.65, + front_forward: 0.8, rear_back: 1.1, y: -0.1, limits: [-0.7, 0.1], diff --git a/src/main.rs b/src/main.rs index 4c203ab..3fc070e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,10 +5,13 @@ use cyber_rider::{ planet::CyberPlanetPlugin, ui::CyberUIPlugin, }; +// const CYBER_SKY: Color = Color::rgb(0.07, 0.001, 0.02); +const CYBER_SKY: Color = Color::rgb(0.64, 0.745, 0.937); + fn main() { let mut app = App::new(); app.insert_resource(Msaa { samples: 4 }) - .insert_resource(ClearColor(Color::rgb(0.07, 0.001, 0.02))) + .insert_resource(ClearColor(CYBER_SKY)) .add_plugins(DefaultPlugins.set(WindowPlugin { window: WindowDescriptor { width: 2560.0, diff --git a/src/planet.rs b/src/planet.rs index eb19646..5b4a5ea 100644 --- a/src/planet.rs +++ b/src/planet.rs @@ -87,7 +87,7 @@ fn gen_planet(sphere: Icosphere) -> (Mesh, Collider) { .iter() .map(|&p| { let disp = noise.get(p.as_dvec3().into()) as f32 * 0.04; - let pt = p + (p.normalize() * disp); + let pt = p; // + (p.normalize() * disp); pt.into() }) .collect::>();