Pickup and Drop object

…sorry in bad English…

Hello my name is Chang from Thailand and and I’m new for Unity…
I have a problem .
I want to pickup object (name “redBin”) by press and hold button “B” .Then I can move when I hold object
But when I release the button, my object is dropped at new position of character.
How to write a code??

if anyone understands my question I have a picture :slight_smile:

up

hi,

Do you already have script for picking up the object ?

*Just saw this, has those features:

1 Like

How about parenting the object to the hands of your character during the pick up animation? At this point the object should be sticked to the hands and follow your character. Then you could unparent it during the drop animation. Could this work?

1 Like

Yes, i want to do this but i dont have any knowledge :cry:

Parenting can be achieved by setting the Transform.parent of the box.