You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Controller Tracked Collider script provides a way of having
decoupled controller colliders from the actual controller GameObject.
This means that the tracked collider collection is not a child of the
controller GameObject so it does not have absolute 1:1 tracking. This
is useful as it means the colliders do not follow the controller to
every specific position and because it uses Rigidbody mechanics to
move the collider collection, the colliders interact within the Unity
physics system.
This results in being able to pass a controller through another
Rigidbody but the colliders for the controller won't pass through with
the controller, instead they will be restricted by the Unity physics
system.
The Controller Rigidbody Activator script has also been updated to
allow it to activate these new tracked controller colliders.
The Ignore Interact Touch Colliders script has also been updated to
ensure these tracked controller colliders are also included in the
ignore routine as they are effectively tied to the Interact Touch
collider set.
Copy file name to clipboardExpand all lines: Assets/VRTK/Documentation/API.md
+56-3Lines changed: 56 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -164,11 +164,13 @@ Provides a simple trigger collider volume that when a controller enters will ena
164
164
* Place the `VRTK/Prefabs/ControllerRigidbodyActivator/ControllerRigidbodyActivator` prefab in the scene at the location where the controller rigidbody should be automatically activated.
165
165
* The prefab contains a default sphere collider to determine ths collision, this collider component can be customised in the inspector or can be replaced with another collider component (set to `Is Trigger`).
166
166
167
-
> 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.
167
+
> If the prefab is placed as a child of the target Interactable Object then the collider volume on the prefab will trigger collisions on the Interactable Object.
168
168
169
169
### Inspector Parameters
170
170
171
-
* **Is Enabled:** If this is checked then the collider will have it's rigidbody toggled on and off during a collision.
171
+
* **Is Enabled:** If this is checked then the Collider will have it's Rigidbody toggled on and off during a collision.
172
+
* **Activate Interact Touch:** If this is checked then the Rigidbody Activator will activate the rigidbody and colliders on the Interact Touch script.
173
+
* **Activate Tracked Collider:** If this is checked then the Rigidbody Activator will activate the rigidbody and colliders on the Controller Tracked Collider script.
172
174
173
175
### Class Events
174
176
@@ -3107,6 +3109,7 @@ A collection of scripts that provide the ability denote objects (such as control
3107
3109
* [Interact Near Touch](#interact-near-touch-vrtk_interactneartouch)
* [Object Auto Grab](#object-auto-grab-vrtk_objectautograb)
3112
3115
@@ -3729,7 +3732,7 @@ Determines if the Interact Touch can initiate a grab with the touched Interactab
3729
3732
* **Grab Button:** The button used to grab/release a touched Interactable Object.
3730
3733
* **Grab Precognition:** An amount of time between when the grab button is pressed to when the controller is touching an Interactable Object to grab it.
3731
3734
* **Throw Multiplier:** An amount to multiply the velocity of any Interactable Object being thrown.
3732
-
* **Create Rigid Body When Not Touching:** If this is checked and the Interact Touch is not touching an Interactable Object when the grab button is pressed then a rigid body is added to the interacting object to allow it to push other rigid body objects around.
3735
+
* **Create Rigid Body When Not Touching:** If this is checked and the Interact Touch is not touching an Interactable Object when the grab button is pressed then a Rigidbody is added to the interacting object to allow it to push other Rigidbody objects around.
3733
3736
* **Controller Attach Point:** The rigidbody point on the controller model to snap the grabbed Interactable Object to. If blank it will be set to the SDK default.
3734
3737
* **Controller Events:** The Controller Events to listen for the events on. If the script is being applied onto a controller then this parameter can be left blank as it will be auto populated by the controller the script is on at runtime.
3735
3738
* **Interact Touch:** The Interact Touch to listen for touches on. If the script is being applied onto a controller then this parameter can be left blank as it will be auto populated by the controller the script is on at runtime.
@@ -3910,6 +3913,56 @@ The AttemptUse method will attempt to use the currently touched Interactable Obj
Provides a controller collider collection that follows the controller rigidbody via the physics system.
3922
+
3923
+
**Required Components:**
3924
+
* `VRTK_InteractTouch` - An Interact Touch script to determine which controller rigidbody to follow.
3925
+
3926
+
**Optional Components:**
3927
+
* `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 `Controller Events` parameter.
3928
+
3929
+
**Script Usage:**
3930
+
* Place the `VRTK_ControllerTrackedCollider` script on any active scene GameObject except the Script Alias objects.
3931
+
* Assign the controller to track by applying an Interact Touch to the relevant Script Alias and then providing that reference to the `Interact Touch` parameter on this script.
3932
+
3933
+
### Inspector Parameters
3934
+
3935
+
* **Interact Touch:** The Interact Touch script to relate the tracked collider to.
3936
+
* **Max Resnap Distance:** The maximum distance the collider object can be from the controller before it automatically snaps back to the same position.
3937
+
* **Activation Button:** The button to press to activate the colliders on the tracked collider set. If `Undefined` then it will always be active.
3938
+
* **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 `Interact Touch` parameter.
Copy file name to clipboardExpand all lines: Assets/VRTK/Prefabs/ControllerRigidbodyActivator/VRTK_ControllerRigidbodyActivator.cs
+26-6Lines changed: 26 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -27,12 +27,16 @@ public struct ControllerRigidbodyActivatorEventArgs
27
27
/// * Place the `VRTK/Prefabs/ControllerRigidbodyActivator/ControllerRigidbodyActivator` prefab in the scene at the location where the controller rigidbody should be automatically activated.
28
28
/// * The prefab contains a default sphere collider to determine ths collision, this collider component can be customised in the inspector or can be replaced with another collider component (set to `Is Trigger`).
29
29
///
30
-
/// > 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.
30
+
/// > If the prefab is placed as a child of the target Interactable Object then the collider volume on the prefab will trigger collisions on the Interactable Object.
0 commit comments