Guides
Guides

VRTK_CustomJointGrabAttach

extends VRTK_BaseJointGrabAttach

Overview

Attaches the grabbed Interactable Object to the grabbing object via a custom Joint.

The Interactable Object will be attached to the grabbing object via a custom Joint and the Joint can be broken upon colliding the Interactable Object with other colliders.

Script Usage:

  • Place the VRTK_CustomJointGrabAttach script on either:
    • The GameObject of the Interactable Object to detect interactions on.
    • Any other scene GameObject and then link that GameObject to the Interactable Objects Grab Attach Mechanic Script parameter to denote use of the grab mechanic.
  • Create a Joint component suitable for attaching the grabbed Interactable Object to the grabbing object with and provide it to the Custom Joint parameter.

Inspector Parameters

  • Custom Joint: The joint to use for the grab attach joint.

Example

VRTK/Examples/021_Controller_GrabbingObjectsWithJoints demonstrates this grab attach mechanic on the Lamp object in the scene.