Fix overhangs in generated terrain.
This commit is contained in:
parent
dcdf11eeb9
commit
d068ba30db
3 changed files with 3 additions and 2 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -461,7 +461,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "bevy_rapier3d"
|
||||
version = "0.12.1"
|
||||
source = "git+https://github.com/nebkor/bevy_rapier?branch=debug-render-capsule#ab6be508dee4b38e886be67148ef4f7657f4c160"
|
||||
source = "git+https://github.com/nebkor/bevy_rapier?branch=debug-render-capsule#3387b8ff9d3615033144cb2e22ad4a965caa6b2b"
|
||||
dependencies = [
|
||||
"bevy",
|
||||
"nalgebra",
|
||||
|
|
|
@ -27,6 +27,7 @@ features = [
|
|||
|
||||
[dependencies.bevy_rapier3d]
|
||||
git = "https://github.com/nebkor/bevy_rapier"
|
||||
#path = "../bevy_rapier/bevy_rapier3d"
|
||||
branch = "debug-render-capsule"
|
||||
features = ["parallel", "simd-nightly"]
|
||||
# version = "0.12"
|
||||
|
|
|
@ -96,7 +96,7 @@ fn gen_planet(sphere: Icosphere) -> Mesh {
|
|||
.iter()
|
||||
.map(|&p| {
|
||||
let disp = noise.get(p.as_dvec3().into()) as f32 * 0.05;
|
||||
let pt = p + disp;
|
||||
let pt = p + (p.normalize() * disp);
|
||||
pt.into()
|
||||
})
|
||||
.collect::<Vec<[f32; 3]>>();
|
||||
|
|
Loading…
Reference in a new issue