diff options
author | JAROWMR <jarorutjes07@gmail.com> | 2024-12-14 20:00:40 +0100 |
---|---|---|
committer | JAROWMR <jarorutjes07@gmail.com> | 2024-12-14 20:00:40 +0100 |
commit | ff2f5120b53792fe5e8cfd45a4335680baf487cf (patch) | |
tree | 2dabe70d6994a294565401a0838d7174851909cc /src/crepe/system/ParticleSystem.cpp | |
parent | 22476a51e00089f8c7b810937250ff4d7a14329e (diff) |
updated offset
Diffstat (limited to 'src/crepe/system/ParticleSystem.cpp')
-rw-r--r-- | src/crepe/system/ParticleSystem.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/crepe/system/ParticleSystem.cpp b/src/crepe/system/ParticleSystem.cpp index 31a4e9e..e61f0ce 100644 --- a/src/crepe/system/ParticleSystem.cpp +++ b/src/crepe/system/ParticleSystem.cpp @@ -48,7 +48,7 @@ void ParticleSystem::update() { void ParticleSystem::emit_particle(ParticleEmitter & emitter, const Transform & transform) { constexpr float DEG_TO_RAD = M_PI / 180.0; - vec2 initial_position = emitter.data.position + transform.position; + vec2 initial_position = emitter.data.offset + transform.position; float random_angle = this->generate_random_angle(emitter.data.min_angle, emitter.data.max_angle); @@ -69,7 +69,7 @@ void ParticleSystem::emit_particle(ParticleEmitter & emitter, const Transform & } void ParticleSystem::check_bounds(ParticleEmitter & emitter, const Transform & transform) { - vec2 offset = emitter.data.boundary.offset + transform.position + emitter.data.position; + vec2 offset = emitter.data.boundary.offset + transform.position + emitter.data.offset; float half_width = emitter.data.boundary.width / 2.0; float half_height = emitter.data.boundary.height / 2.0; |