VRC_Pickup

Used to allow objects to be picked up and held

Requires:

  • Rigidbody
  • Collider

Parameter

Description

Momentum Transfer Method

This 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 Theft

If other users are allowed to take the pickup out of some else's grip

Physical Root

Can 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 Gun

The position object will be held if set to Exact Gun

Exact Grip

The position object will be held if set to Exact Grip

Allow Manipulation When Equipped

Should the user be able to manipulate the pickup while the pickup is held if using a controller

Orientation

What way the object will be held

Auto Hold

Should 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 Text

Text 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 Speed

How fast the object needs to move to be thrown

Throw Velocity Boost Scale

How much throwing should scale, higher = faster thrown while lower means slower throw speed

Pickupable

Can you pickup the pickup

RPC's are available via the SendRPC action

RPC

Valid Targets

Description

Drop

Local, Owner

If the pickup is currently held, this forces it to be dropped

PlayHaptics

All

Plays haptic feedback on the player's controller


Did this page help you?