Provides a controller collider collection that follows the controller rigidbody via the physics system.
VRTK_InteractTouch- An Interact Touch script to determine which controller rigidbody to follow.
VRTK_ControllerEvents- The events component to listen for the button presses on. This must be applied in the same object hierarchy as the Interact Touch script if one is not provided via the
- Place the
VRTK_ControllerTrackedColliderscript on any active scene GameObject except the Script Alias objects.
- Assign the controller to track by applying an Interact Touch to the relevant Script Alias and then providing that reference to the
Interact Touchparameter on this script.
- Interact Touch: The Interact Touch script to relate the tracked collider to.
- Max Resnap Distance: The maximum distance the collider object can be from the controller before it automatically snaps back to the same position.
- Activation Button: The button to press to activate the colliders on the tracked collider set. If
Undefinedthen it will always be active.
- Controller Events: An optional Controller Events to use for listening to the button events. If this is left blank then it will attempt to be retrieved from the same controller as the
public virtual void ToggleColliders(bool state)
bool state- If
truethen the tracked colliders will be able to affect other Rigidbodies.
The ToggleColliders method toggles the collision state of the tracked colliders.
public virtual Collider TrackedColliders()
Collider- A Collider array of the tracked colliders.
The TrackedColliders method returns an array of the tracked colliders.
Updated less than a minute ago