From 7ee27e61a505fb9d632b13cbf932b1597be7af75 Mon Sep 17 00:00:00 2001 From: Joe Ardent Date: Mon, 20 Feb 2023 13:35:02 -0800 Subject: [PATCH] smooth out the planet --- src/bike/body.rs | 3 ++- src/planet.rs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/bike/body.rs b/src/bike/body.rs index d841c14..be51f86 100644 --- a/src/bike/body.rs +++ b/src/bike/body.rs @@ -16,7 +16,8 @@ pub(super) fn spawn_cyberbike( wheel_conf: Res, mut meshterials: Meshterial, ) { - let altitude = PLANET_RADIUS - 180.0; + //let altitude = PLANET_RADIUS - 180.0; + let altitude = PLANET_RADIUS + 10.0; // smoothland 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/planet.rs b/src/planet.rs index 8e6807b..e9076ef 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); // smoothland pt.into() }) .collect::>();