Casting abilities in the location i am looking at.


Long story, short I am new in UE4 and in c++ in general and have just basic knowledge when it comes to programming so I am getting stuck by unsolved, for me, problems all the time.

I am currently trying to make my character cast an explosive spell in the location I am aiming with the mouse and then add a max range on how far you can cast it so you won’t be able to cast far away. I imagine the ability to work something like this:

first, the casting phase where the animation plays while at the location that you chose to cast the spell spawns an actor with particles (the particles spawn correctly).
and then after everything is done it spawns the second actor in the same location that has collision and damages the enemies(I have figured out how the collision works).

The pic below shows what I am trying to do based on what I managed to find searching but I found a dead end. I tried to connect the nodes using multiples ways and the farthest I went was to spawn the particles in the location of my camera. I am getting stuck in the “how can I properly find the location I am aiming at”.