public WebXRInput(WebXRHandedness handedness) { Handedness = handedness; for (int i = 0; i < AXES_BUTTON_COUNT; i++) { Buttons[i] = new WebXRGamepadButton(); } }
public WebXRInput GetInput(WebXRHandedness handedness) { return(handedness == WebXRHandedness.Left ? LeftInput : RightInput); }
/// <summary> /// Applies haptic pulse feedback to a controller /// </summary> /// <param name="hand">Controller to apply feedback</param> /// <param name="intensity">Feedback strength between 0 and 1</param> /// <param name="duration">Feedback duration in milliseconds</param> public static void HapticPulse(WebXRHandedness hand, float intensity, float duration) { _dataArray[101 + (int)hand] = intensity; _dataArray[103 + (int)hand] = duration; }