NAMESPACE MyDreamGameStudio.InteractAnything
MENU PATH Interaction System > Utilities > Grabbable Item
COMPATIBILITY Unity 6.0+
DOC VERSION v1.0.0 (Latest) Previous Versions...
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 ITEM PHYSICS OBJECT CARRY CONFIG Per-item configuration for grab, carry, and throw behavior. Hooks into a local Interactable to trigger pickups. INTERACTABLE LINKING ⚡ Auto-Config Interactable Auto-Wire Toggle CARRY POSE & OFFSET Default Hold Distance 2.5 Hold Rotation Offset X 0 Y 0 Z 0 Lock World Rotation Use Custom Screen Offset Custom Hold Offset X 0.4 Y -0.2 MOUSE SCROLL DISTANCE Allow Scrolling Distance Min Hold Distance 0.8 Max Hold Distance 3 Scroll Sensitivity 0.15 THROW MECHANICS Min Throw Force 5 Max Throw Force 20 Max Charge Time 1.2
Configuration Variables
Setup & Linking
Auto-Wire Toggle bool Def: 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 float Def: 2.5
How far in front of the camera the item rests when initially picked up. Use Custom Screen Offset bool Def: True
Allows this specific item to override the global Screen Hold Offset defined on the GrabController. Useful for exceptionally large items. Lock World Rotation bool Def: False
If true, the item maintains its original world rotation while being carried, rather than rotating to face the same direction as the camera.
Allow Scrolling Distance bool Def: 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 float Def: 1.2
How long (in seconds) the player must hold the throw key to reach the Max Throw Force.