- Home /
Picking up and dropping objects with parenting
In my game I wanted the first person player prefab to be able to pick up certain objects one at a time and be able to hold only up to two, do actions with them, and then be able to drop them one at a time. I thought to do this with by having the objects parent to the player at the appropriate button press and then un-parent at another button press.
The biggest problem with this, is that I can't get the object to parent to a consistent place on the player so you may be able to see it when you are holding it. It always happens to be at a different place of the players rotation, which isn't what I want. And parenting to the camera generally makes player just freak out and do weird things.
Any ideas on how to make it work?
Answer by The_r0nin · Dec 06, 2010 at 04:59 PM
As someone else suggested a few questions down, create an empty object and parent it to your character model at the spot where you want your pick-up to be located. Then parent your pick-up to that empty object, and it should get the same position and rotation every time you parent...
also be sure to set the pickup position /rotation to the empty as well
Your answer
![](https://koobas.hobune.stream/wayback/20220613085949im_/https://answers.unity.com/themes/thub/images/avi.jpg)