Skip to main content

Grabbable Item

NAMESPACEMyDreamGameStudio.InteractAnything
MENU PATHInteraction System > Utilities > Grabbable Item
COMPATIBILITYUnity 6.0+
DOC VERSION

The GrabbableItem component turns a standard physics Rigidbody into a carriable object. It acts as the data container for the specific item, defining how far from the camera it should be held, how sensitive it is to mouse-wheel scrolling, and how much force is applied when thrown.


Editor Interface​

GRABBABLE ITEMPHYSICS OBJECTCARRY CONFIGPer-item configuration for grab, carry, and throw behavior. Hooks into a local Interactable to trigger pickups.INTERACTABLE LINKING⚡ Auto-Config InteractableAuto-Wire ToggleCARRY POSE & OFFSETDefault Hold Distance2.5Hold Rotation OffsetX0Y0Z0Lock World RotationUse Custom Screen OffsetCustom Hold OffsetX0.4Y-0.2MOUSE SCROLL DISTANCEAllow Scrolling DistanceMin Hold Distance0.8Max Hold Distance3Scroll Sensitivity0.15THROW MECHANICSMin Throw Force5Max Throw Force20Max Charge Time1.2

Configuration Variables​

Setup & Linking​

Auto-Wire Toggle
boolDef: True
If true, this script automatically hooks into the attached Interactable's OnInteractionComplete event. You do not need to manually assign UnityEvents on prefabs.

Carry Pose & Offset​

Default Hold Distance
floatDef: 2.5
How far in front of the camera the item rests when initially picked up.
Use Custom Screen Offset
boolDef: True
Allows this specific item to override the global Screen Hold Offset defined on the GrabController. Useful for exceptionally large items.
Lock World Rotation
boolDef: False
If true, the item maintains its original world rotation while being carried, rather than rotating to face the same direction as the camera.

Mouse Scroll Distance​

Allow Scrolling Distance
boolDef: True
Allows the player to use the mouse wheel to push the item further away or pull it closer while holding it.
Min / Max Hold Distance
float
The absolute clamps for the scroll distance, preventing the player from pushing the item into a wall or pulling it behind the camera.

Throw Mechanics​

Min / Max Throw Force
float
The velocity applied to the item's Rigidbody. Min is used for a quick tap; Max is applied if the player holds the throw key down until fully charged.
Max Charge Time
floatDef: 1.2
How long (in seconds) the player must hold the throw key to reach the Max Throw Force.