From fe396c458b38ee209dd4c1f3ba4d053bef20f57a Mon Sep 17 00:00:00 2001 From: JAROWMR Date: Thu, 19 Dec 2024 12:55:04 +0100 Subject: tested system, added roation to emitter --- src/crepe/system/ParticleSystem.cpp | 2 +- src/crepe/system/RenderSystem.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/crepe') diff --git a/src/crepe/system/ParticleSystem.cpp b/src/crepe/system/ParticleSystem.cpp index 3183fd7..31c1800 100644 --- a/src/crepe/system/ParticleSystem.cpp +++ b/src/crepe/system/ParticleSystem.cpp @@ -51,7 +51,7 @@ void ParticleSystem::emit_particle(ParticleEmitter & emitter, const Transform & vec2 initial_position = AbsolutePosition::get_position(transform, emitter.data.offset); float random_angle - = this->generate_random_angle(emitter.data.min_angle, emitter.data.max_angle); + = this->generate_random_angle(emitter.data.min_angle+transform.rotation, emitter.data.max_angle+transform.rotation); float random_speed = this->generate_random_speed(emitter.data.min_speed, emitter.data.max_speed); diff --git a/src/crepe/system/RenderSystem.cpp b/src/crepe/system/RenderSystem.cpp index 1091c3f..d76a122 100644 --- a/src/crepe/system/RenderSystem.cpp +++ b/src/crepe/system/RenderSystem.cpp @@ -98,7 +98,7 @@ bool RenderSystem::render_particle(const Sprite & sprite, const double & scale) .sprite = sprite, .texture = res, .pos = p.position, - .angle = p.angle+sprite.data.angle_offset, + .angle = p.angle, .scale = scale, }); } -- cgit v1.2.3