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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Making an object that you pick up, go to a specific spot on your controller

Discussion in 'AR/VR (XR) Discussion' started by AppleML, Jul 16, 2017.

  1. AppleML

    AppleML

    Joined:
    Jul 16, 2017
    Posts:
    5
    Hi! I recently got working the ability to pick up objects. When i pick them up, how can i make it so it goes to a specific spot on the controller?

    For Example:

    Say you are going to pick up a baseball bat. When you pick it up, i would want the bat to go in your hand, so your holding the bottom of the bat. I dont want to be able to pick the bat up from all angles.
     
  2. HenryAsh

    HenryAsh

    Joined:
    Apr 11, 2017
    Posts:
    12
    I think it automatically goes to the anchor point on that model. This is defined in the modelling software.
     
  3. adrian-lupsan

    adrian-lupsan

    Joined:
    Jul 4, 2016
    Posts:
    9
    one solution would be to manually get the desired position and rotation of the object when it is in your hand and in the moment you pick it up, after parenting it to the hand model, assign its local position and rotation to the values you determined manually