1 using System.Collections;
2 using System.Collections.Generic;
34 protected override void Awake() {
36 _inputManager = GetComponentInChildren<AVR_ControllerInputManager>();
38 if (controllerNode==XRNode.LeftHand && !leftHandController) leftHandController =
this;
39 if (controllerNode == XRNode.RightHand && !rightHandController) rightHandController =
this;
46 if(inputDevice.TryGetHapticCapabilities(out var capabilities)) {
50 AVR_DevConsole.cwarn(
"Could not retrieve haptic capavilites from controller.",
this);
51 return default(HapticCapabilities);
61 if (GetHapticCapabilities().supportsImpulse)
63 inputDevice.SendHapticImpulse(0u, amplitude, duration);
Represents a VR controller. Provides functionality for spacial tracking and haptic feedback...
Sets the documentation html file inside of Packages/com.avr.core/Documentation/html of a given class...
HapticCapabilities GetHapticCapabilities()
Returns the haptic capabilites of this controller.
void HapticPulse(float amplitude, float duration)
Performs a haptic pulse on this controller (if available) Normalized amplitude of the pulse...
Represents some spatially tracked XR device. Provides functionality for spacial tracking. Can be used to represent hardware trackers, game controllers or other references.