Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Thursday, June 8, for a Q&A with Unity's Content Pipeline group here on the forum, and on the Unity Discord, and discuss topics around Content Build, Import Workflows, Asset Database, and Addressables!
    Dismiss Notice

Question Rotating an object once it has been picked up with XR Grab Interactable from XR Interaction Toolkit

Discussion in 'VR' started by JOakley91, Dec 18, 2022.

  1. JOakley91

    JOakley91

    Joined:
    Oct 24, 2013
    Posts:
    2
    Hi all,

    I am playing around trying to make an axe throwing game, everything is going good so far - I've made a menu scene and a game scene with an axe, table and target (screenshots here https://imgur.com/a/aKMtRBc )


    However the axe stays the rotation it was when I pick it up, I want it to point the same way the camera is facing, as if you were about to throw it. Explanation here: https://imgur.com/a/GV8yA3X


    Is there just a script I can add so when it is picked up it rotates a certain way?

    I have found this page, however I have not had any luck making the object rotate.

    Thanks in advance
     
  2. JOakley91

    JOakley91

    Joined:
    Oct 24, 2013
    Posts:
    2
    Fixed. On the intractable object I just had to turn on Track rotation and turn off Match rotation