checkpoint

This commit is contained in:
Joe Ardent 2023-02-18 19:46:18 -08:00
parent 507b82a771
commit 9e45aef7e4
4 changed files with 7 additions and 6 deletions

View File

@ -16,7 +16,7 @@ pub(super) fn spawn_cyberbike(
wheel_conf: Res<WheelConfig>, wheel_conf: Res<WheelConfig>,
mut meshterials: Meshterial, mut meshterials: Meshterial,
) { ) {
let altitude = PLANET_RADIUS - 100.0; let altitude = PLANET_RADIUS + 10.0;
let mut xform = Transform::from_translation(Vec3::X * altitude) let mut xform = Transform::from_translation(Vec3::X * altitude)
.with_rotation(Quat::from_axis_angle(Vec3::Z, -89.0f32.to_radians())); .with_rotation(Quat::from_axis_angle(Vec3::Z, -89.0f32.to_radians()));

View File

@ -16,7 +16,6 @@ pub struct CyberWheel;
#[reflect(Resource)] #[reflect(Resource)]
pub struct WheelConfig { pub struct WheelConfig {
pub front_forward: f32, pub front_forward: f32,
pub front_stance: f32,
pub rear_back: f32, pub rear_back: f32,
pub y: f32, pub y: f32,
pub limits: [f32; 2], pub limits: [f32; 2],
@ -30,8 +29,7 @@ pub struct WheelConfig {
impl Default for WheelConfig { impl Default for WheelConfig {
fn default() -> Self { fn default() -> Self {
Self { Self {
front_forward: 0.9, front_forward: 0.8,
front_stance: 0.65,
rear_back: 1.1, rear_back: 1.1,
y: -0.1, y: -0.1,
limits: [-0.7, 0.1], limits: [-0.7, 0.1],

View File

@ -5,10 +5,13 @@ use cyber_rider::{
planet::CyberPlanetPlugin, ui::CyberUIPlugin, 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() { fn main() {
let mut app = App::new(); let mut app = App::new();
app.insert_resource(Msaa { samples: 4 }) 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 { .add_plugins(DefaultPlugins.set(WindowPlugin {
window: WindowDescriptor { window: WindowDescriptor {
width: 2560.0, width: 2560.0,

View File

@ -87,7 +87,7 @@ fn gen_planet(sphere: Icosphere) -> (Mesh, Collider) {
.iter() .iter()
.map(|&p| { .map(|&p| {
let disp = noise.get(p.as_dvec3().into()) as f32 * 0.04; 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() pt.into()
}) })
.collect::<Vec<[f32; 3]>>(); .collect::<Vec<[f32; 3]>>();