Sprite gets rotated when Joystick Y at 1 or -1?
So essentially we have a top down, 2d game, currently with placeholder visuals. we control the movement of the Character using an xbox gamepad. We want to be able to have a sprite with a little triangle on it in front of the player to indicate what direction they are pushing the stick, but we have an issue. If the y component of the direction vector from the controller is at either 1 or -1 (stick pushed all the way up or all the way down), the sprite disappears. Upon further inspection by pausing the game editor, we can see that the sprite has simply been rotated 90 degrees so it can no longer be seen from above. How can we prevent this?
To be clear, I am using Quaternion.LookRotation to set the rotation of the sprite object. I pass the input vector from the controller as the first argument. I have tried multiple different things as the second argument (Vector3.up, Vector3.right, etc) but everything gives me the same result.