diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/crepe/system/ParticleSystem.cpp | 2 | ||||
-rw-r--r-- | src/example/game.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/crepe/system/ParticleSystem.cpp b/src/crepe/system/ParticleSystem.cpp index e61f0ce..35a1d41 100644 --- a/src/crepe/system/ParticleSystem.cpp +++ b/src/crepe/system/ParticleSystem.cpp @@ -27,7 +27,7 @@ void ParticleSystem::update() { = mgr.get_components_by_id<Transform>(emitter.game_object_id).front().get(); // Emit particles based on emission_rate - emitter.spawn_accumulator = emitter.data.emission_rate * dt; + emitter.spawn_accumulator += emitter.data.emission_rate * dt; while (emitter.spawn_accumulator >= 1.0) { this->emit_particle(emitter, transform); emitter.spawn_accumulator -= 1.0; diff --git a/src/example/game.cpp b/src/example/game.cpp index ed6afac..db0d04b 100644 --- a/src/example/game.cpp +++ b/src/example/game.cpp @@ -271,7 +271,7 @@ public: = particle.add_component<ParticleEmitter>(particle_image, ParticleEmitter::Data{ .offset = {0, 0}, .max_particles = 256, - .emission_rate = 50, + .emission_rate = 1, .min_speed = 10, .max_speed = 20, .min_angle = -20, |