diff options
author | JAROWMR <jarorutjes07@gmail.com> | 2024-12-16 21:18:28 +0100 |
---|---|---|
committer | JAROWMR <jarorutjes07@gmail.com> | 2024-12-16 21:18:28 +0100 |
commit | ea7beae5974838b6e1727c539b0899ad157bc1fb (patch) | |
tree | 58bee53561b9d001f553436c94ef92ff48f66e14 /src/crepe | |
parent | cfbfef8deb9e278ad9a9023bda36fd3aa3f17373 (diff) |
updated particle
Diffstat (limited to 'src/crepe')
-rw-r--r-- | src/crepe/system/ParticleSystem.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/crepe/system/ParticleSystem.cpp b/src/crepe/system/ParticleSystem.cpp index 35a1d41..fb6cfd7 100644 --- a/src/crepe/system/ParticleSystem.cpp +++ b/src/crepe/system/ParticleSystem.cpp @@ -7,6 +7,7 @@ #include "../api/Transform.h" #include "../manager/ComponentManager.h" #include "../manager/LoopTimerManager.h" +#include "util/AbsoluutPosition.h" #include "ParticleSystem.h" @@ -47,8 +48,8 @@ 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.offset + transform.position; + + vec2 initial_position = AbsoluutPosition::get_position(transform, emitter.data.offset); float random_angle = this->generate_random_angle(emitter.data.min_angle, emitter.data.max_angle); |