Class XRControllerWithRumble
Identifies a controller that is capable of rumble or haptics.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: UnityEngine.Experimental.Input.Plugins.XR
Syntax
public class XRControllerWithRumble : XRController, IHaptics
Properties
isHapticsPaused
Used to check if the haptics for this device is currently paused.
Declaration
public bool isHapticsPaused { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
FinishSetup(InputDeviceBuilder)
Declaration
protected override void FinishSetup(InputDeviceBuilder builder)
Parameters
Type | Name | Description |
---|---|---|
InputDeviceBuilder | builder |
Overrides
PauseHaptics()
Pauses haptics so that motor speed on the device will be 0, regardless of the current intensity level.
Declaration
public void PauseHaptics()
ResetHaptics()
Resets the haptics for this device to defaults. Defaults are an intensity of 0 and unpaused.
Declaration
public void ResetHaptics()
ResumeHaptics()
Resumes haptics so that motor intensity is again forwarded onto the actual device.
Declaration
public void ResumeHaptics()
SetIntensity(Single)
Set's this device's motor intensity.
Declaration
public void SetIntensity(float intensity)
Parameters
Type | Name | Description |
---|---|---|
System.Single | intensity | The intensity of [0-1] you'd like to set device's haptic rumbling to. |
Remarks
Intensities are updated immediately, and all values outside of the [0-1] range will be clamped.