From 055d5e9b3069b2f6cbda54e8f235cd7baf269415 Mon Sep 17 00:00:00 2001 From: hut Date: Fri, 10 May 2024 13:46:01 +0200 Subject: [PATCH] add ring to all gas giants --- src/commands.rs | 3 ++- src/data/defs.txt | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/commands.rs b/src/commands.rs index cc88757..53301f6 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -828,10 +828,11 @@ fn spawn_entities( } if state.has_ring { + let ring_radius = state.model_scale * (nature::JUPITER_RING_RADIUS / nature::JUPITER_RADIUS) as f32; commands.spawn(( world::DespawnOnPlayerDeath, MaterialMeshBundle { - mesh: meshes.add(Mesh::from(Cylinder::new(nature::JUPITER_RING_RADIUS as f32, 1.0))), + mesh: meshes.add(Mesh::from(Cylinder::new(ring_radius, 1.0))), material: materials_jupiter.add(load::JupitersRing { alpha_mode: AlphaMode::Blend, ring_radius: nature::JUPITER_RING_RADIUS as f32, diff --git a/src/data/defs.txt b/src/data/defs.txt index 7b37b33..dbcb149 100644 --- a/src/data/defs.txt +++ b/src/data/defs.txt @@ -203,6 +203,7 @@ actor 0 0 0 name Saturn planet yes sphere yes + ring yes physics off scale 58232e3 axialtilt 26.73 @@ -217,6 +218,7 @@ actor 0 0 0 name Uranus planet yes sphere yes + ring yes physics off scale 25362e3 axialtilt 82.23 @@ -231,6 +233,7 @@ actor 0 0 0 name Neptune planet yes sphere yes + ring yes physics off scale 24622e3 axialtilt 28.32