Hello guys,
I’m trying to achieve a magic spell, that shoots a beam of sparks at the enemy.
I want it to start at the players hand (couldn’t find out, how to asign the hand bone from the Mesh to the "Spwan Emitter Attached) and to follow the players rotation. Despite thinking, calculating the emitter rotation correctly, shoudln’t be the problem, I have serious troubles to rotate the spawn emitter at all. When I set some rotation at the “required” section, nothing happens. This Emitter spawns always to the ground. Is there any way to fix that?
I used the P_Sparks from the Starter Pack.
Hard to tell exactly what you’re trying to do, but you might try putting a socket in the hand bone, spawning the emitter attached to that socket. Since it’s attached, it should follow what the socket does, so if the player turns the socket turns, and you don’t have to rotate the emitter at all, just simply activate/deactivate it.
The emitter will face forward constantly in relation to the socket, but the socket will rotate with the player because it’s attached to skeletal structure.
(You may have to rotate the socket or the emitter to get the initial vector to your liking, a proper forward vector if you will)
Thank you for your answer!
Attaching to socket worked fine! And I finally found out, why it points to the ground!
This is my character blueprint:
And this the socket:
Until here, everything is fine. But I didn’t mind this setting:
How can I translate the player rotation into acceleration of the emitter? Is this going to work? Or do you know any other way to do this?
Found out how! I just deleted const. acceleration and inserted initial velocity. This fixed the problem.
Good deal. Glad you figured it out because I’m not real good at particle effects modification.
Out of curiosity, looking at your blueprint, why do you break the Rotator and then instantly remake it without making any changes?
There is a lot to learn about emitters… Every time something else is not working.
Now I try to deal damage to the object it hits. I have some struggles, but maybe I can do it