unsmooth the planet

This commit is contained in:
Joe Ardent 2023-02-21 14:22:43 -08:00
parent 851f2fb650
commit 881e6858de
2 changed files with 2 additions and 3 deletions

View File

@ -16,8 +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 - 180.0; let altitude = PLANET_RADIUS - 180.0;
let altitude = PLANET_RADIUS + 10.0; // smoothland
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

@ -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); // smoothland let pt = p + (p.normalize() * disp);
pt.into() pt.into()
}) })
.collect::<Vec<[f32; 3]>>(); .collect::<Vec<[f32; 3]>>();