Search Unity

Make robust pickup animation (best practices?)

Discussion in 'Animation' started by CatTheGrimReaper, Jan 14, 2020.

  1. CatTheGrimReaper

    CatTheGrimReaper

    Joined:
    Jan 8, 2020
    Posts:
    2
    Hey people,

    I want to have a robot (the Robot Kyle Unity Model) pick up a cube and throw it into a container (on repeat). I know how to animate, but I searched and searched and couldn't seem to find a kind of "best practice" for animating a character and have this animation impact something in the scene. I kind of found a solution by just making a pickup animation for the robot and adding a collider to its arm and a box collider to the cube - if they collide, the cube gets attached to the robot's wrist by means of a fixed joint. The problem is, it only works 50% of the time, and it doesn't really look realistic. Sometimes the package is attached to the outside of the hand and sometimes it just floats away and so on.
    I have tried the IK thing (https://docs.unity3d.com/Manual/InverseKinematics.html -- I did this, with Robot Kyle and everything exactly like in the manual) with the tutorial on the unity website, but the robot just kind of... slumped (kind of like it fell to its knees), fell through the floor and began to slowly rise through the floor (although everything had a collider) to grab the package.
    I am at my wits end and on a dead line and I would be forever thankful if someone could tell me how I can make a RELIABLE animation where the robot actually picks up the cube, carries it between his hands to the box and drops it.

    Thank you in advance!

    Greetings,

    CatTheGrimReaper
     
unityunity