{"_id":"594949e82be16d0026ec0539","category":{"_id":"594949e62be16d0026ec04d4","version":"594949e52be16d0026ec04cd","project":"571fa55ca0acd42000af9545","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-01-01T16:45:52.489Z","from_sync":false,"order":6,"slug":"interactions","title":"Interactions"},"parentDoc":null,"project":"571fa55ca0acd42000af9545","user":"571fa519db52d01700f5cf3d","version":{"_id":"594949e52be16d0026ec04cd","project":"571fa55ca0acd42000af9545","__v":2,"createdAt":"2017-06-20T16:14:29.816Z","releaseDate":"2017-06-20T16:14:29.816Z","categories":["594949e62be16d0026ec04ce","594949e62be16d0026ec04cf","594949e62be16d0026ec04d0","594949e62be16d0026ec04d1","594949e62be16d0026ec04d2","594949e62be16d0026ec04d3","594949e62be16d0026ec04d4","594949e62be16d0026ec04d5","594949e62be16d0026ec04d6","594949e62be16d0026ec04d7","594949e62be16d0026ec04d8","594949e62be16d0026ec04d9","594949e62be16d0026ec04da","594949e62be16d0026ec04db","594949e62be16d0026ec04dc","594949e62be16d0026ec04dd","594949e62be16d0026ec04de","594949e62be16d0026ec04df","594949e62be16d0026ec04e0","594949e62be16d0026ec04e1","59497219f4a8980024dd0631"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"Kunekune","version_clean":"3.2.0","version":"3.2.0"},"__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-01-01T16:47:43.281Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":10,"body":"## Overview\n\nThe Interact Haptics script is attached on the same GameObject as an Interactable Object script and provides controller haptics on touch, grab and use of the object.\n\n## Inspector Parameters\n\n * **Clip On Touch:** Denotes the audio clip to use to rumble the controller on touch.\n * **Strength On Touch:** Denotes how strong the rumble in the controller will be on touch.\n * **Duration On Touch:** Denotes how long the rumble in the controller will last on touch.\n * **Interval On Touch:** Denotes interval betweens rumble in the controller on touch.\n * **Clip On Grab:** Denotes the audio clip to use to rumble the controller on grab.\n * **Strength On Grab:** Denotes how strong the rumble in the controller will be on grab.\n * **Duration On Grab:** Denotes how long the rumble in the controller will last on grab.\n * **Interval On Grab:** Denotes interval betweens rumble in the controller on grab.\n * **Clip On Use:** Denotes the audio clip to use to rumble the controller on use.\n * **Strength On Use:** Denotes how strong the rumble in the controller will be on use.\n * **Duration On Use:** Denotes how long the rumble in the controller will last on use.\n * **Interval On Use:** Denotes interval betweens rumble in the controller on use.\n\n## Class Events\n\n * `InteractHapticsTouched` - Emitted when the haptics are from a touch.\n * `InteractHapticsGrabbed` - Emitted when the haptics are from a grab.\n * `InteractHapticsUsed` - Emitted when the haptics are from a use.\n\n## Unity Events\n\nAdding the `VRTK_InteractHaptics_UnityEvents` component to `VRTK_InteractHaptics` object allows access to `UnityEvents` that will react identically to the Class Events.\n\n * All C# delegate events are mapped to a Unity Event with the `On` prefix. e.g. `MyEvent` -> `OnMyEvent`.\n\n## Event Payload\n\n * `VRTK_ControllerReference controllerReference` - The reference to the controller to perform haptics on.\n\n## Class Methods\n\n### HapticsOnTouch/1\n\n  > `public virtual void HapticsOnTouch(VRTK_ControllerReference controllerReference)`\n\n  * Parameters\n   * `VRTK_ControllerReference controllerReference` - The reference to the controller to activate the haptic feedback on.\n  * Returns\n   * _none_\n\nThe HapticsOnTouch method triggers the haptic feedback on the given controller for the settings associated with touch.\n\n### HapticsOnGrab/1\n\n  > `public virtual void HapticsOnGrab(VRTK_ControllerReference controllerReference)`\n\n  * Parameters\n   * `VRTK_ControllerReference controllerReference` - The reference to the controller to activate the haptic feedback on.\n  * Returns\n   * _none_\n\nThe HapticsOnGrab method triggers the haptic feedback on the given controller for the settings associated with grab.\n\n### HapticsOnUse/1\n\n  > `public virtual void HapticsOnUse(VRTK_ControllerReference controllerReference)`\n\n  * Parameters\n   * `VRTK_ControllerReference controllerReference` - The reference to the controller to activate the haptic feedback on.\n  * Returns\n   * _none_\n\nThe HapticsOnUse method triggers the haptic feedback on the given controller for the settings associated with use.","excerpt":"","slug":"vrtk_interacthaptics","type":"basic","title":"VRTK_InteractHaptics"}

VRTK_InteractHaptics


## Overview The Interact Haptics script is attached on the same GameObject as an Interactable Object script and provides controller haptics on touch, grab and use of the object. ## Inspector Parameters * **Clip On Touch:** Denotes the audio clip to use to rumble the controller on touch. * **Strength On Touch:** Denotes how strong the rumble in the controller will be on touch. * **Duration On Touch:** Denotes how long the rumble in the controller will last on touch. * **Interval On Touch:** Denotes interval betweens rumble in the controller on touch. * **Clip On Grab:** Denotes the audio clip to use to rumble the controller on grab. * **Strength On Grab:** Denotes how strong the rumble in the controller will be on grab. * **Duration On Grab:** Denotes how long the rumble in the controller will last on grab. * **Interval On Grab:** Denotes interval betweens rumble in the controller on grab. * **Clip On Use:** Denotes the audio clip to use to rumble the controller on use. * **Strength On Use:** Denotes how strong the rumble in the controller will be on use. * **Duration On Use:** Denotes how long the rumble in the controller will last on use. * **Interval On Use:** Denotes interval betweens rumble in the controller on use. ## Class Events * `InteractHapticsTouched` - Emitted when the haptics are from a touch. * `InteractHapticsGrabbed` - Emitted when the haptics are from a grab. * `InteractHapticsUsed` - Emitted when the haptics are from a use. ## Unity Events Adding the `VRTK_InteractHaptics_UnityEvents` component to `VRTK_InteractHaptics` 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 * `VRTK_ControllerReference controllerReference` - The reference to the controller to perform haptics on. ## Class Methods ### HapticsOnTouch/1 > `public virtual void HapticsOnTouch(VRTK_ControllerReference controllerReference)` * Parameters * `VRTK_ControllerReference controllerReference` - The reference to the controller to activate the haptic feedback on. * Returns * _none_ The HapticsOnTouch method triggers the haptic feedback on the given controller for the settings associated with touch. ### HapticsOnGrab/1 > `public virtual void HapticsOnGrab(VRTK_ControllerReference controllerReference)` * Parameters * `VRTK_ControllerReference controllerReference` - The reference to the controller to activate the haptic feedback on. * Returns * _none_ The HapticsOnGrab method triggers the haptic feedback on the given controller for the settings associated with grab. ### HapticsOnUse/1 > `public virtual void HapticsOnUse(VRTK_ControllerReference controllerReference)` * Parameters * `VRTK_ControllerReference controllerReference` - The reference to the controller to activate the haptic feedback on. * Returns * _none_ The HapticsOnUse method triggers the haptic feedback on the given controller for the settings associated with use.