Handle

→ Handle API

An Handle can be used to give direction on how an object can be grabbed. A sword is usually grabbed by the hilt, a gun by the grip.

When a Rigidbody with a Hadle is grabbed, the Rigidbody will move into the hand such that the Handle will fit in the palm of the hand.

When a static object with a Handle is grabbed, the hand itself will move such that the Handle fits in the palm of the hand.

The handle is visualized in the scene view using a yellow cuboid.

Setup

An handle has the following properties:

Position The local position of the handle.
Rotation The local rotation in euler angles of the handle.
Hand Sets which hand can grab the handle. Some handles may only be grabbed by the left or right hand.
Grab Type The Default Grab is the Bar Grab. If No Grab is selected the object cannot be grabbed.
Range The range within the handle will work. Outside this range normal grabbing is used.
Hand Pose The Hand Pose which will be active while the Handle is grabbed.
Hand Target When the Handle is grabbed this will contain the Hand Target of the grabbing hand. When the Hand Target of a Handle is set in the editor while editing the scene the applicable hand will try to grab the Handle.