Top-Down Aiming System


I am working on a top-down shooter game and I’m having a difficulty creating the aiming system.
Here is what I’m trying to do:
The player moves the mouse cursor around and the character aims wherever the mouse cursor is (from -180 to 180).

And here is my setup:
Animation Blueprint:
1D Aim Offset:
Character Blueprint Event Graph: (The ‘Look Direction’ variable affects the 1D AimOffset)

With this set up, the front part of the character is working great but whenever I go lower than -90 or higher than 90, the value just returns to 0, instead of going all the way to -180 and 180.

What I am doing wrong?

Dan Zaidan

Just figured it out.
All I needed to do was a Branch (if statement) to separate the rotation in two parts (one was already ready, the other one was just the same thing flipped the other way). :slight_smile:

Hello, i know you post this 3 years ago but if you are here, please can you post a screenshot ?

I have a solution too :smiley:
When you touch the screen the character aim the touch point
I make it in Animation Blueprint