Updates the controller position and rotation. Definition at line 92 of file AVR_GenericXRDevice.cs. 96 if ((trackingState & InputTrackingState.Position) != 0 && inputDevice.TryGetFeatureValue(CommonUsages.devicePosition, out var devicePosition))
100 transform.localPosition = Vector3.Lerp(transform.localPosition, devicePosition, Time.deltaTime * smoothingFidelity * 90.0f);
108 if ((trackingState & InputTrackingState.Rotation) != 0 && inputDevice.TryGetFeatureValue(CommonUsages.deviceRotation, out var deviceRotation))
112 transform.localRotation = Quaternion.Lerp(transform.localRotation, deviceRotation, Time.deltaTime * smoothingFidelity * 90.0f);
InputDevice inputDevice XR.Inputdevice that this controller represents. Definition: AVR_GenericXRDevice.cs:37 bool smoothing Defines if positional tracking is smoothed across several frames. Makes controllers less shaky... Definition: AVR_GenericXRDevice.cs:70 |