Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question How can I move object to player hand and then make the object child of the player hand ?

Discussion in 'Editor & General Support' started by SharonL75, Oct 13, 2020.

  1. SharonL75

    SharonL75

    Joined:
    Aug 13, 2020
    Posts:
    91
    When I'm running the game the object name NAVI is child of a empty GameObject and the GameObject is child of Carte_0_0

    The NAVI have a script that makes him move to the Player hand :

    upload_2020-10-13_21-18-31.png

    At some point in the game NAVI is start moving to the player hand and when the NAVI is reaching the Player hand NAVI become child of the hand.

    The problem is when the NAVI become child of the hand it looks like the NAVI is jumping or changing position at once and not smooth.

    My main goal is to make the navi move to the player hand and then to become child of the hand so when I'm moving the player around the NAVI will be at his hand.

    In this screenshot you can see there is a duplicated Navi object I called it Navi Destination on the player hand.
    Before that NAVI was only inside the Carte_0_0

    So far I tried to move the NAVI to the hand then make it child I tried to use coroutine and then in the Update in all the cases I tried the transition from being child of the Carte to be Child of the hand is not smooth.

    The change from being child of the carte and be child of the hand looks like it's changing position at once and it's not looking natural change. I want to make it smooth like the object move to the player hand and then it will be part of the hand like the hand is holding it.

    The problem is that I can't figure out how to make it smooth.

    I thought as last try maybe to change the alpha value of the NAVI's so when the navi reach the hand the navi in the carte alpha will be 0 and the alpha in the navi destination become 1. but I'm not sure if this is a good idea.