add ring to all gas giants

This commit is contained in:
yuni 2024-05-10 13:46:01 +02:00
parent 21fc2a55f5
commit 055d5e9b30
2 changed files with 5 additions and 1 deletions

View file

@ -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,

View file

@ -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