To make an object in your scene able to be picked up by players who have Vive or Touch controllers, you will need to follow these steps:
- Add a vrc_pickup script on the root object, which will automatically add a RigidBody component to you object
- Add a vrc_objectsync script on the root object (this will make the object networked so others can see the interactions)
- Add a vrc_speciallayer script to the root object (this will avoid the object colliding with the players)
- The root object should have a collider added as well, however if you use a MeshCollider, you will need to make sure it is marked as convex.
The default way an object is picked up is freehand meaning the object will attach to the hand in the position your hand is grabbing it. There is also the option to force an object to always align in a certain way in the hand which is useful for things such as guns.
Physical Root: Exact Gun: A transform used to tell the position the object should be held if Orientation is set to Gun
Exact Grip: A transform used to tell the position the object should be held if Orientation is set to Grip
Defer To Pickup: Orientation:
Use Down Event Name: This event is sent once when trigger is held down.
Use Up Event Name: This event is sent once when the trigger is released.
Pickup Event Name: This event is sent once when a player picks up the object.
Drop Event Name: This event is sent once when a player drops the object.