I want to enable particles on a fireball, but the fireball's position is dynamically changing via a Vector2f position, to which the Sprite position is adjusted. Basically I've got a Vector2f fireball.position and then I'm using sprFireball.setPosition(fireball.position). It's for convenience only.
But to the point. I've got a ParticleSystem and most basic Emitter properties declared outside the game loop, but as the fireball's position is changing in the game loop, I need to somehow move the Emitter's particle position to that of the fireball. I've looked up Bromeon's tutorial on Particles and Connections, but that didn't help in my case. I was toying around with it for the past 2 hours or so and can't find a solution.
I'll try to minimize the code and put it below
thor::ParticleSystem fireballParticleSystem;
//adding textures
thor::UniversalEmitter fireballEmitter;
//setting properties
fireballParticleSystem.addEmitter(fireballEmitter);
// adding the emitter for the first time
sf::Clock fireballFrameTime;
// for emitter updates
// window and isOpen,
{ // game loop
// setting the position of the fireball, its rotation, moving it and using the fireball.position to store the
position
}