CVR Pickup Object
Add this component to configure a GameObject as a pickup. Players can grab pickup objects with their hands. At runtime the component derives from Pickupable and adds a Rigidbody (kinematic if missing) plus a CVRSharedPhysicsController on awake.
Fields
Section titled “Fields”Version
Section titled “Version”int. Schema version; LATEST_VERSION = 1. Older pickups are migrated by ConfigureOlderPickups: when updateWithPhysics is false or gripType == Origin, moveMode is forced to Transform; a maximumGrabDistance of 0 is upgraded to 100.
Auto Hold
Section titled “Auto Hold”bool. When true, the item auto-holds once grabbed instead of being released when the grab input is released.
Disallow Theft
Section titled “Disallow Theft”bool. Prevents other players from grabbing the pickup while it is already in someone else’s hand. Owner grace: the original owner can still pick it up. Objects grabbed longer than 0.4s are transferred smoothly on network sync.
Disable Object Push/Pull
Section titled “Disable Object Push/Pull”bool. Disables push/pull on the pickup while held. Only relevant when gripType == Free.
Disable Telepathic Grab
Section titled “Disable Telepathic Grab”bool. Prevents the telepathic grab (flinging the object into the hand).
Maximum Grab Distance
Section titled “Maximum Grab Distance”float. Maximum distance in metres at which the pickup can be grabbed. In desktop mode, an extra 1.5 * playSpaceScale is added. Clamped to [0, 100]. Default 5.
Grip Type
Section titled “Grip Type”GripType enum:
Free(default) — the object stays where it is and is not moved to the player’s grip location.Origin— the object is moved so that itsGrip Originaligns with the hand.
Only Free allows object rotation and push/pull.
Grip Origin
Section titled “Grip Origin”Transform. Pose used when gripType == Origin. In desktop mode, if a child transform named [Desktop] exists under gripOrigin, it is used instead (letting you author a different desktop pose).
Snapping References
Section titled “Snapping References”List<SnappingReference>. Each entry has:
referencePoint— transform on the pickup that lines up with a snapping point.allowedType— string filter matched againstCVRSnappingPoint.type.target— local offset applied when snapped.distance— maximum distance at which snapping activates (default9999).point— cachedCVRSnappingPointreference.
Entries are registered with CVRSnappingPointManager while the pickup is held.
Update With Physics
Section titled “Update With Physics”bool. Legacy flag (default true). If false on version 0 data, the pickup is migrated to MoveMode.Transform.
Move Mode
Section titled “Move Mode”MoveMode enum:
Rigidbody (Physics)— default. UsesRigidbodyPickupHandler.Transform (Update)—UpdatePickupHandler. Writes the transform directly instead of applying physics.
Collision With Player
Section titled “Collision With Player”CollisionWithPlayer enum:
DisableWhileHeldAndColliding— disable pickup/player collisions while held and currently colliding (default).DisableWhileHeld— disable for the whole held duration.DontDisable— never disable.
Throw Force Multiplier
Section titled “Throw Force Multiplier”float. Multiplier applied to hand-motion velocity on drop. Default 1.5.
Throw Force Min Velocity
Section titled “Throw Force Min Velocity”float. Minimum hand velocity before a throw is considered. Default 1.
IK Reference
Section titled “IK Reference”Transform. Optional transform used as the IK target for hand posing while held.
Runtime-only properties
Section titled “Runtime-only properties”CanPickup— true when pickupable, active, collider present and enabled, and (when theft is disallowed) not currently held by a different owner.IsAutoHold,DisallowTheft,IsTelepathicGrabAllowed,IsObjectRotationAllowed,IsObjectPushPullAllowed,IsObjectUseAllowed,RootTransform,MaxGrabDistance,MaxPushDistance— overrides ofPickupablebehaviour derived from the fields above.Initialized— true onceStarthas completed.IsTelepathicGrabbed— true while a fling / telepathic grab is active.GrabStartTime—Time.timewhen the current grab started.GetTimeSinceGrabStart()— convenience elapsed time.
SetRespawnLocation(Vector3, Quaternion)— override the respawn pose.SetRespawnHeight(float)— override the Y threshold below which the pickup resets.ResetLocation()— teleport back to the saved pose and zero velocity (drops if held by you).SetAutoHold(bool),ForceRelease(),ForcePickup()— runtime controls.FlingTowardsTarget(ControllerRay)— start a physics- or direct-fling coroutine for telepathic grab.ResetFlungStatus()— clear the flung / telepathic flag.
Related
Section titled “Related”Source
Section titled “Source”CVR-GameFiles/ABI.CCK.Components/CVRPickupObject.cs, CVR-GameFiles/ABI.CCK.Components/CollisionWithPlayer.cs, CVR-GameFiles/ABI.CCK.Components/SnappingReference.cs