particles: make unlit

This commit is contained in:
yuni 2024-09-16 01:42:57 +02:00
parent 5ab4ee2fcf
commit 39054c71d2
2 changed files with 3 additions and 2 deletions

View file

@ -570,7 +570,7 @@ pub fn apply_input_to_player(
// Visual effect // Visual effect
if bike.is_none() && acceleration_total.length_squared() > 1e-4 { if bike.is_none() && acceleration_total.length_squared() > 1e-4 {
let thruster_direction = acceleration_total.normalize(); let thruster_direction = acceleration_total.normalize();
let thruster_v = v.0 - 10.0 * thruster_direction; let thruster_v = v.0 - 5.0 * thruster_direction;
ew_effect.send(visual::SpawnEffectEvent { ew_effect.send(visual::SpawnEffectEvent {
duration: 2.0, duration: 2.0,
class: visual::Effects::ThrusterParticle(pos.clone(), LinearVelocity::from(thruster_v)), class: visual::Effects::ThrusterParticle(pos.clone(), LinearVelocity::from(thruster_v)),

View file

@ -186,7 +186,7 @@ pub fn spawn_effects(
FadeMaterial { FadeMaterial {
start_time: now, start_time: now,
duration: effect.duration, duration: effect.duration,
value_start: 0.1, value_start: 0.01,
value_end: 0.0, value_end: 0.0,
}, },
world::DespawnAt(now + effect.duration), world::DespawnAt(now + effect.duration),
@ -198,6 +198,7 @@ pub fn spawn_effects(
base_color_texture: Some(texture), base_color_texture: Some(texture),
perceptual_roughness: 1.0, perceptual_roughness: 1.0,
metallic: 0.5, metallic: 0.5,
unlit: true,
alpha_mode: AlphaMode::Blend, alpha_mode: AlphaMode::Blend,
..Default::default() ..Default::default()
}), }),