Ok, I implemented the code you last added:
var direction = Vector2()
direction.x = int(Input.is_action_pressed("stick_right")) - int(Input.is_action_pressed("stick_left"))
direction.y = int(Input.is_action_pressed("stick_down")) - int(Input.is_action_pressed("stick_up"))
if direction == Vector2(-1, 1):
print("aiming left up")
(I also added the code checking all the other directions, not just left up)
And it works fine, except it doesn't have deadzone.
So I am next going to use the deadzone code you implemented earlier, however first i need to understand a few things more. :)
input_direction.x = Input.get_joy_axis(DEVICE_ID, JOY_ANALOG_LX)
input_direction.y = Input.get_joy_axis(DEVICE_ID, JOY_ANALOG_LY)
Is this unnecessary with the code i have? I'm pretty sure my code is already doing this just differently.
var dir = int(round(input_angle_in_degrees/45.0)*45)
not quite sure what this is doing, could you explain?
pretty sure i've learned this somwhere before, but I haven't done a lot of coding so I'm not sure what kind of statement this is.
Thanks so much for your help, and I totally get it if you don't want to answer all this. :)