Hey,
I’m currently stuck on a (probably simple) rotation task.
I have a Joystick gameobject in a VR game the player can grab. Once he does, the player’s hand snaps to the joystick in a holding animation. While the hand is attached i get x and y values between -1 and 1 to represent the current joystick position.
Now i want to rotate the joystick gameobject by about 25° in a positive or negative direction depending on the values i’m getting on both the x and y axis, the goal basically is to give the player a visual representation of where he is tilting the joystick.
So if you did it with a simple gamepad i want a visual representation ingame of the real joystick position.
I’m pretty new to rotations and quaternions and have been playing around with Quaternion.Lerp and Quaternion.EulerAngles, but haven’t been able to achieve the desired result.
Can anyone point me in the right direction? (pun intended :p)
Thanks in advance!
Kawa