How do you get joystick directional movement

Hi all,

how might you shoot a ray in the direction the gamepad stick is facing? e.g. if I push the joystick up, it shoots directly above the player and if it’s facing left the ray also shoots left and if the joystick is facing diagonal the ray also shoots in that direction.

I’ve been looking online and have not managed to find anything explaining this and would appreciate any insight into this.

Thanks in advance.

Hello, Krell.

What you want requires a lot of different pieces of knowledge.

You need to be able to:

  1. Set up a basic controller with rotational functionality"
    (You can use the default BP_THIRDPERSONCHARACTER)

  2. Set up a gamepad system that utilizes the above"

  3. Learn how to create line traces:

  4. Learn how to handle collisions so those line traces are not prematurely interrupted:
    (See above)