Hard coded rotation of child results in weird arc rotation when parent is rotated?
Hi everyone,
I have a vive tracker running in unity that I want to use to control the main camera. Unfortunately, the rotational axis of the tracker lines up such that when sitting flat in the real world, the camera in unity points directly upwards. As far as I could find, you can't change the axis the main camera looks down, so I tried to fix this by making the camera a child of a parent object that is controlled by the tracker, and then rotating the camera by 90 degrees to get it to face forwards instead of up. However, when I move the tracker up and down (rotation on the x-axis) the camera view makes this weird arc. It looks up and down, but slowly rotates clockwise when I look up (along the z-axis), and slowly rotates counterclockwise when I look down. I also saw this effect when trying to rotate with euler angles.
Does anyone have any idea why this is happening? Does anyone have any ideas about how to dissociate the main camera from its default axis so I can get it to look forward instead of straight up?
For clarification, z-axis points towards the screen, x-axis is off the right, and y-axis is vertical.
Your answer
Follow this Question
Related Questions
Changing distance to aim target cause LookAt jump/jitter 1 Answer
Rotation on the Z axis not happening 1 Answer
MouseOrbitImproved slanted orbit 0 Answers
Camera Quaternion.RotateTowards without rolling/banking 1 Answer
Free look camera flipping back to original rotation after unlocking from monster target. 0 Answers