Download

Dash in mouse direction

Hi, I’m new to UE4, trying to launch my sprite in whatever direction my mouse is by a fixed amount of distance.

(Ignore part “then 2” and “then 3” of the sequencer, they work just fine)

I use a vector formula to calculate where the direction of the launch will be.

Every time I right click, however, it always launches the sprite to the right and slightly up depending on my mouse position.
I suppose the problem is with the “Get location” part, but I have no idea on how to fix it.

If anyone would help me figure out the problem and the solution, or maybe even optimization, I’d be very glad. Thank you!