{"_id":"594955425fd213001ae4afa1","project":"571fa55ca0acd42000af9545","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"},"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"},"user":"571fa519db52d01700f5cf3d","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-06-20T17:02:58.944Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":3,"body":"## Overview\n\nThe Controller Haptics scripts are a collection of static methods for calling haptic functions on a given controller.\n\n## Class Methods\n\n### TriggerHapticPulse/2\n\n  > `public static void TriggerHapticPulse(VRTK_ControllerReference controllerReference, float strength)`\n\n  * Parameters\n   * `VRTK_ControllerReference controllerReference` - The reference to the controller to activate the haptic feedback on.\n   * `float strength` - The intensity of the rumble of the controller motor. `0` to `1`.\n  * Returns\n   * _none_\n\nThe TriggerHapticPulse/2 method calls a single haptic pulse call on the controller for a single tick.\n\n### TriggerHapticPulse/4\n\n  > `public static void TriggerHapticPulse(VRTK_ControllerReference controllerReference, float strength, float duration, float pulseInterval)`\n\n  * Parameters\n   * `VRTK_ControllerReference controllerReference` - The reference to the controller to activate the haptic feedback on.\n   * `float strength` - The intensity of the rumble of the controller motor. `0` to `1`.\n   * `float duration` - The length of time the rumble should continue for.\n   * `float pulseInterval` - The interval to wait between each haptic pulse.\n  * Returns\n   * _none_\n\nThe TriggerHapticPulse/4 method calls a haptic pulse for a specified amount of time rather than just a single tick. Each pulse can be separated by providing a `pulseInterval` to pause between each haptic pulse.\n\n### TriggerHapticPulse/2\n\n  > `public static void TriggerHapticPulse(VRTK_ControllerReference controllerReference, AudioClip clip)`\n\n  * Parameters\n   * `VRTK_ControllerReference controllerReference` - The reference to the controller to activate the haptic feedback on.\n   * `AudioClip clip` - The audio clip to use for the haptic pattern.\n  * Returns\n   * _none_\n\nThe TriggerHapticPulse/2 method calls a haptic pulse based on a given audio clip.\n\n### CancelHapticPulse/1\n\n  > `public static void CancelHapticPulse(VRTK_ControllerReference controllerReference)`\n\n  * Parameters\n   * `VRTK_ControllerReference controllerReference` - The reference to the controller to cancel the haptic feedback on.\n  * Returns\n   * _none_\n\nThe CancelHapticPulse method cancels the existing running haptic pulse on the given controller index.","excerpt":"","slug":"vrtk_controllerhaptics","type":"basic","title":"VRTK_ControllerHaptics"}

VRTK_ControllerHaptics


## Overview The Controller Haptics scripts are a collection of static methods for calling haptic functions on a given controller. ## Class Methods ### TriggerHapticPulse/2 > `public static void TriggerHapticPulse(VRTK_ControllerReference controllerReference, float strength)` * Parameters * `VRTK_ControllerReference controllerReference` - The reference to the controller to activate the haptic feedback on. * `float strength` - The intensity of the rumble of the controller motor. `0` to `1`. * Returns * _none_ The TriggerHapticPulse/2 method calls a single haptic pulse call on the controller for a single tick. ### TriggerHapticPulse/4 > `public static void TriggerHapticPulse(VRTK_ControllerReference controllerReference, float strength, float duration, float pulseInterval)` * Parameters * `VRTK_ControllerReference controllerReference` - The reference to the controller to activate the haptic feedback on. * `float strength` - The intensity of the rumble of the controller motor. `0` to `1`. * `float duration` - The length of time the rumble should continue for. * `float pulseInterval` - The interval to wait between each haptic pulse. * Returns * _none_ The TriggerHapticPulse/4 method calls a haptic pulse for a specified amount of time rather than just a single tick. Each pulse can be separated by providing a `pulseInterval` to pause between each haptic pulse. ### TriggerHapticPulse/2 > `public static void TriggerHapticPulse(VRTK_ControllerReference controllerReference, AudioClip clip)` * Parameters * `VRTK_ControllerReference controllerReference` - The reference to the controller to activate the haptic feedback on. * `AudioClip clip` - The audio clip to use for the haptic pattern. * Returns * _none_ The TriggerHapticPulse/2 method calls a haptic pulse based on a given audio clip. ### CancelHapticPulse/1 > `public static void CancelHapticPulse(VRTK_ControllerReference controllerReference)` * Parameters * `VRTK_ControllerReference controllerReference` - The reference to the controller to cancel the haptic feedback on. * Returns * _none_ The CancelHapticPulse method cancels the existing running haptic pulse on the given controller index.