diff --git a/src/game.rs b/src/game.rs index 2463d05..273e42b 100644 --- a/src/game.rs +++ b/src/game.rs @@ -124,16 +124,24 @@ pub fn spawn_characters>( characters: I, ) { + const Z_INCREMENT: f32 = 0.01; + let mut curr_z: f32 = Z_INCREMENT; + for (i, (transform, color)) in characters.into_iter().enumerate() { spawn_character( commands, character_meshes, materials, audio, - transform, + { + let mut new_transform: Transform = transform; + new_transform.translation.z = curr_z; + new_transform + }, color, i == 0, ); + curr_z += Z_INCREMENT; } } diff --git a/src/particle_effect.rs b/src/particle_effect.rs index b711548..a9984b2 100644 --- a/src/particle_effect.rs +++ b/src/particle_effect.rs @@ -134,5 +134,6 @@ fn particle_effect_system( / particle_effect.radius_squared, ); } + transform.translation.z = 0.005; } }