diff --git a/src/VFX.cs b/src/VFX.cs index 7c4771b..2ac072c 100644 --- a/src/VFX.cs +++ b/src/VFX.cs @@ -23,7 +23,7 @@ static class VFX index = (index + 1) % particles.Length; Particle particle = particles[index]; particle.pos = pos; - particle.vel = Quat.FromAngles(Random.Shared.NextSingle() * 360, 0, 0) * Quat.FromAngles(0, Random.Shared.NextSingle() * 360, 0) * Vec3.Forward * 1.0f; + particle.vel = Quat.FromAngles(Random.Shared.NextSingle() * 360, 0, 0) * Quat.FromAngles(0, Random.Shared.NextSingle() * 360, 0) * Vec3.Forward * 6.0f; particle.ori = Quat.Identity; particle.scl = (1.0f / 3) * Maths.smooth_start(Random.Shared.NextSingle()); } @@ -37,17 +37,19 @@ static class VFX if (particle.vel.MagnitudeSq > float.Epsilon) { particle.pos += particle.vel * Time.Stepf; - float scl_rad = particle.scl * 0.5f * 0.333f; - Vec3 next_pos = V.XYZ( - Maths.s_clamp(particle.pos.x, 2 - scl_rad), - Maths.s_clamp(particle.pos.y, 2 - scl_rad), - Maths.s_clamp(particle.pos.z, 2 - scl_rad) - ); - if (next_pos.x != particle.pos.x || next_pos.y != particle.pos.y || next_pos.z != particle.pos.z) - { - particle.pos = next_pos; - particle.vel = Vec3.Zero; - } + particle.vel *= 1 - (3 * Time.Stepf); + particle.scl *= 1 - (3 * Time.Stepf); + // float scl_rad = particle.scl * 0.5f * 0.333f; + // Vec3 next_pos = V.XYZ( + // Maths.s_clamp(particle.pos.x, 2 - scl_rad), + // Maths.s_clamp(particle.pos.y, 2 - scl_rad), + // Maths.s_clamp(particle.pos.z, 2 - scl_rad) + // ); + // if (next_pos.x != particle.pos.x || next_pos.y != particle.pos.y || next_pos.z != particle.pos.z) + // { + // particle.pos = next_pos; + // particle.vel = Vec3.Zero; + // } } } }