I am currently building a demo and I need to be able to pick up boxes and then set them on a table. Using the built in DragRigidbody script is to flimsy with the spring constraint. I need to be able to grab a box maybe center it in the camera or on the mouse then move it to a shelf and then release. It really doesn’t have to look amazing I just need a place to start. Any help would be great.
Make the item you pickup a child of the controlling player or camera. All you need to do for that is :
// Lets say box is the box's gameObject
box.transform.parent = camera.transform;
Then when you want to drop it
box.transform.parent = null;
That will mean that any movement you make with the camera will translate accordingly to the box. If you need to centre it to the screen, you can use the cameras transform.forward vector, and place the box a little further along it if it’s too close.