I’m making a 2D game and i want my character to shoot in the direction of the right thumbstick.
But i can’t figure out how to get the direction and set it as the rotation.
i tried to make a vector out of horizontal and vertical joystick movement combined and then convert this to rotation, but this didn’t work. At the moment it fires in the direction of the player and i’m using a make transform node to set the direction
I don’t have a gamepad with me right now so I can’t test it, but I’m pretty sure this will work.
Since the laser’s yaw is already being driven by the direction your character is facing, you’re really only looking to influence the pitch of the laser, via your right stick’s vertical axis value. In that case, you could try something like this: