im in a bit of a pickle. I am working on trying to make objects that I release from my hand in VR adopt the correct velocity and angularVelocity of the controller so they feel correct. This is a simple matter of tracking the controller angularvelocity and velocity and passing it to the opbject upon release:
rigid.velocity = controller.currentVelocity; rigid.angularVelocity = controller.currentAngularVelocity;
However, and here comes the kicker, I also have a locomotion system that happens to rotate the CameraRig with regards to the head of the player and after doing so these values are all wrong and shifted with regards to the cameraRig as so:
cameraRig.transform.RotateAround(headsetCamera.transform.position, Vector3.up, -(headsetCamera.transform.eulerAngles.y - lastHeadRot.y)); lastHeadRot = headsetCamera.transform.eulerAngles;
That’s basically it, If I use other forms of locomotion angularVelocity gets set properly and works fine, but after shifting the world with the above code it messes up ther calculations entirely. Im wondering what I can do about this. Any suggestions?
Thank you for your attention.