Background:
I’m trying to make a combat system that uses the a sequence of Xbox controller right analog stick directions input to cast an attack. Example kinda like cheat codes. The user enters a sequence of buttons like X then Y then A and the cheat is enabled. Except for mine I’m using directions Up , then , Down, then Right. and the attack is cast.
Problem:
I figured out how detect Analog stick directions. But i cant make the Combo system
Directional Input Code
Here is my analog stick directional code. It works well but not sure if its how your suppose to do it.
Here i’m just seeing if the player holds the Right Bumper and checks to see if the Analog stick is in the middle of the x and y axis.
float stickHorzontal = joystickInput.x;
float stickVertical = joystickInput.y;
if (playerInput.RightBumper == true && stickHorzontal >= .1f && stickVertical >= .1f )
{
print("Upper Right stick pressed");
}
if (playerInput.RightBumper == true && stickHorzontal >= .5f)
{
print("Right stick pressed");
}