Skip to main content

Add Component > Massive Loop > Interactive > MLGrab

MLGrab Component

Makes the attached object grabbable by the player. Player can both grab the object by pointing the layer pointer or by bringing their hands close to the object.

The MLGrab component allow dual hand grabbing of the objects. The first hand which grabs the object is called Primary Hand and the point that it grabs is referred to as Primary Grab Point. Other hand grabbing the object is referred to as Secondary Hand and the grab point which the secondary hand grabs on referred to as Secondary Grab Point.

By attaching MLSynchronizer to the the object, the Grabbing events will be synchronized to everyone in the room.

Requires

Parameters

NameDescription
Grab MechanicThe mechanic of the grabbing. By selecting the Custom and using Lua scripting you can create Custom grabbing mechanic.
- Force MultiplierForce Mode only. Amount of force factor to applied to the object.
- Torque MultiplierForce Mode only. Amount of torque to applied to the object.
Stick To HandKeeps the object grabbed by the hand, even if the grab button is released. Releasing the object requires pressing the grab object again.
Apply Movement PhysicsKeeps track of the linear and angular velocities of the object while it is grabbed by player and applies them to object when released.
Surface GrabBy enabling this, the object becomes grabbable at any point on surface of any collider attached to it. If not selected, the grab points need to be defined for both primary and secondary hands.
Grab LocationsGrab Location will define the location and orientation which the object will be grabbed by the player. Check out MLGrabPoint .
On Primary Grab Begin ()Event fired when a player grabs the object by primary hand. This event will be synchronized if MLSynchronizer is used.
On Primary Grab End()Event fired when the player releases the object from the primary hand. This event will be synchronized if MLSynchronizer is used.
On Secondary Grab Begin()Event fired when the player grabs the object by their secondary hand. This event will be synchronized if MLSynchronizer is used.
On Secondary Grab End ()Event fired when the player released the object from secondary hand. This event will be synchronized if MLSynchronizer is used.
On Primary Trigger down ()Event fired when the player presses down the trigger button while holding to the primary grab point of the object. This event will be synchronized if MLSynchronizer is used.
On Primary Trigger Up ()Event fired when the player releases the trigger button while holding to the primary grab point of the object. This event will be synchronized if MLSynchronizer is used.
On Secondary Trigger Down ()Event fired when the player presses down the trigger button while holding to the secondary grab point of the object. This event will be synchronized if MLSynchronizer is used.
On Secondary Trigger Up ()Event fired when the player releases the trigger button while holding to the secondary grab point of the object. This event will be synchronized if MLSynchronizer is used.

Event Actions ?

ActionDescriptionInput
DropObject()Force drops the object if it is held by local player.none

API

MLGrab