Class XRControllerWithRumble | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class XRControllerWithRumble

    Identifies a controller that is capable of rumble or haptics.

    Inheritance
    System.Object
    InputControl
    InputDevice
    XRController
    XRControllerWithRumble
    KnucklesController
    OculusTouchController
    ViveWand
    WMRSpatialController
    Inherited Members
    XRController.leftHand
    XRController.rightHand
    InputDevice.kInvalidDeviceId
    InputDevice.description
    InputDevice.enabled
    InputDevice.canRunInBackground
    InputDevice.added
    InputDevice.remote
    InputDevice.native
    InputDevice.updateBeforeRender
    InputDevice.id
    InputDevice.lastUpdateTime
    InputDevice.wasUpdatedThisFrame
    InputDevice.allControls
    InputDevice.valueType
    InputDevice.valueSizeInBytes
    InputDevice.ReadValueFromStateAsObject(Void*)
    InputDevice.ReadValueFromStateIntoBuffer(Void*, Void*, Int32)
    InputDevice.CompareValue(Void*, Void*)
    InputDevice.MakeCurrent()
    InputDevice.OnAdded()
    InputDevice.OnRemoved()
    InputDevice.ExecuteCommand<TCommand>(TCommand)
    InputControl.ReservedCharacters
    InputControl.name
    InputControl.displayName
    InputControl.shortDisplayName
    InputControl.path
    InputControl.layout
    InputControl.variants
    InputControl.device
    InputControl.parent
    InputControl.children
    InputControl.usages
    InputControl.aliases
    InputControl.stateBlock
    InputControl.noisy
    InputControl.synthetic
    InputControl.Item[String]
    InputControl.ToString()
    InputControl.EvaluateMagnitude()
    InputControl.EvaluateMagnitude(Void*)
    InputControl.WriteValueFromBufferIntoState(Void*, Int32, Void*)
    InputControl.WriteValueFromObjectIntoState(Object, Void*)
    InputControl.CompareState(Void*, Void*, Void*)
    InputControl.TryGetChildControl(String)
    InputControl.RefreshConfigurationIfNeeded()
    InputControl.RefreshConfiguration()
    InputControl.m_StateBlock
    InputControl.currentStatePtr
    InputControl.previousFrameStatePtr
    InputControl.defaultStatePtr
    InputControl.noiseMaskPtr
    InputControl.stateOffsetRelativeToDeviceRoot
    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
    XRController.FinishSetup(InputDeviceBuilder)

    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.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023