VRC_Pickup

Used to allow objects to be picked up and held

Requires:

  • Rigidbody
  • Collider
ParameterDescription
Momentum Transfer MethodThis defines how the collision force will be added to the other object which was hit, using Rigidbody.AddForceAtPosition.
Note: the force will only be added if 'AllowCollisionTransfer' is on.
Disallow TheftIf other users are allowed to take the pickup out of some else's grip
Physical RootCan be used if the root of the object is not on the same gameobject as this script, allows for multiple pickup points on a single object.
Exact GunThe position object will be held if set to Exact Gun
Exact GripThe position object will be held if set to Exact Grip
Allow Manipulation When EquippedShould the user be able to manipulate the pickup while the pickup is held if using a controller
OrientationWhat way the object will be held
Auto HoldShould the pickup remain in the users hand after they let go of the grab button.
Auto Detect - Automatically detects what to do
Yes - After the grab button is released the pickup remains in the hand until the drop button is pressed and released
No - After the grab button is released the pickup is let go
Use TextText that appears when the user has an object equipped, prompting them to "fire" the object.
Requires "Auto Hold" to be set to "Yes".
Throw Velocity Boost Min SpeedHow fast the object needs to move to be thrown
Throw Velocity Boost ScaleHow much throwing should scale, higher = faster thrown while lower means slower throw speed
PickupableCan you pickup the pickup

RPC's are available via the SendRPC action

RPCValid TargetsDescription
DropLocal, OwnerIf the pickup is currently held, this forces it to be dropped
PlayHapticsAllPlays haptic feedback on the player's controller