Download

Top-Down Aiming System

Hello!

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).
img01.png
img02.png

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

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.
img06.png

What I am doing wrong?

Thanks,
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