Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

SteamVR CameraRig rotation, problem throwing objs

Discussion in 'VR' started by gomi91, Aug 10, 2019.

  1. gomi91


    Aug 26, 2017
    I'm creating a VR application in Unity using SteamVR. I have implemented a Snap Rotation Script, so, the user can turn himself in-game without doing it phisicaly.

    My hierachy is: [CameraRig] -> (Controller left, Controller right, camera)

    Now the problem is: when I'm holding an object and i want to throw it, if i rotated the CameraRig earlier, the object throwed behave strangely. Its direction is out of phase, based on the cumulative rotation of the CameraRig. If I never rotate the CameraRig, the throwed object behave normally

    I'm using FixedJoint component to attach the object to the hand.

    How can I fix this?

    My code: