Guides
These docs are for v3.2.0. Click to read the latest docs for v3.3.0.

Controller Rigidbody Activator

Overview

This adds a simple trigger collider volume that when a controller enters will enable the rigidbody on the controller.

The prefab game object should be placed in the scene where another interactable game object (such as a button control) is located to turn the controller rigidbody on at the appropriate time for interaction with the control without needing to manually activate by pressing the grab.

If the prefab is placed as a child of the target interactable game object then the collider volume on the prefab will trigger collisions on the interactable object.

The sphere collider on the prefab can have the radius adjusted to determine how close the controller needs to be to the object before the rigidbody is activated.

It's also possible to replace the sphere trigger collider with an alternative trigger collider for customised collision detection.

Inspector Parameters

  • Is Enabled: If this is checked then the collider will have it's rigidbody toggled on and off during a collision.

Class Events

  • ControllerRigidbodyOn - Emitted when the controller rigidbody is turned on.
  • ControllerRigidbodyOff - Emitted when the controller rigidbody is turned off.

Unity Events

Adding the VRTK_ControllerRigidbodyActivator_UnityEvents component to VRTK_ControllerRigidbodyActivator object allows access to UnityEvents that will react identically to the Class Events.

  • All C# delegate events are mapped to a Unity Event with the On prefix. e.g. MyEvent -> OnMyEvent.

Event Payload

  • interactingObject - The object that touching the activator.