h-shirakami Posted September 28, 2020 Share Posted September 28, 2020 How can I temporarily rotate and move the HMD camera by myself in VIU?I wanted to rotate the HMD's camera when an event occurred, so I rotated the ViveCameraRig, but I couldn't get the correct results.I referred to Teleport in Examples.It rotates the x-axis after moving forward, which is not the intended result. I think the cause is the movement of the camera. How can I change the camera transform directly? Link to comment Share on other sites More sharing options...
lawwong Posted September 28, 2020 Share Posted September 28, 2020 Do you mean you want to rotate camera root around HMD? public static void RotateAroundHMD(Transform vrOrigin, Transform hmd, Quaternion rot) { vrOrigin.position = rot * (vrOrigin.position - hmd.position) + hmd.position; vrOrigin.rotation = rot * vrOrigin.rotation; } public static void OnSomeRightTurnEventOcurred() { // Turn right around Y axis for 45 degree RotateAroundHMD(vrOrigin, hmd, Quaternion.Euler(new Vector3(0f, 45f, 0f))); } 1 Link to comment Share on other sites More sharing options...
h-shirakami Posted September 28, 2020 Author Share Posted September 28, 2020 Ah! I see. I'll give it a try. Thank you Link to comment Share on other sites More sharing options...
Asish Posted April 6, 2021 Share Posted April 6, 2021 (edited) Hello @lawwong @h-shirakami How can I get head rotation value using VIVE pro eye while watching object in the scene? Any idea to get standard head rotation value? Thanks in advance Edited April 6, 2021 by Asish add more person to tag Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now