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

Implementing transition for my character picking up an object from the floor

Discussion in 'Animation' started by tHE_uKER, Nov 9, 2019.

  1. tHE_uKER

    tHE_uKER

    Joined:
    Oct 19, 2019
    Posts:
    24
    I need to have my 2D character pick up an object from the floor, and lift it above its head, being able to carry it.

    I have figured out that setting the object's transform.parent to my character's transform achieves the effect of the object becoming fixed to it. Then I adjust its transform.localposition to move it above the character's head and presto!

    The problem is the transition. If I parent the object to my character first, its coordinate frame changes, and it momentarily disappears to who-knows-where. Then I change the coordinates to something near the origin, and the object comes zooming in back to being close to the character.
    The sequence of events happens very similarly if I adjust the coordinates first and change the parenting later.

    My goal is simply getting the object to move in a straight line at constant speed from its initial position on the floor to a location near my character's hand.

    What's you guys' advice on how to implement this?

    Thanks in advance.
     
    Last edited: Nov 11, 2019
  2. tHE_uKER

    tHE_uKER

    Joined:
    Oct 19, 2019
    Posts:
    24
    Anyone?
     
  3. tHE_uKER

    tHE_uKER

    Joined:
    Oct 19, 2019
    Posts:
    24
    Wow, I'm overwhelmed.