UxrManipulationHapticFeedback Class

Component that, added to a grabbable object (UxrGrabbableObject), sends haptic feedback to any controller that manipulates it.

Inheritance Hierarchy

System.Object
  Object
    Component
      Behaviour
        MonoBehaviour
          UltimateXR.Core.Components.UxrComponent
            UltimateXR.Core.Components.UxrComponent(UxrManipulationHapticFeedback)
              UltimateXR.Core.Components.Composite.UxrGrabbableObjectComponent(UxrManipulationHapticFeedback)
                UltimateXR.Haptics.Helpers.UxrManipulationHapticFeedback
Namespace: UltimateXR.Haptics.Helpers
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0

Syntax

C#

[RequireComponent(typeof(UxrGrabbableObject))]
public class UxrManipulationHapticFeedback : UxrGrabbableObjectComponent<UxrManipulationHapticFeedback>


The UxrManipulationHapticFeedback type exposes the following members.

Constructors

NameDescription
Public methodUxrManipulationHapticFeedback

Properties

NameDescription
Public propertyContinuousManipulationHaptics Gets or sets whether the component will send haptic feedback continuously while the object is being grabbed.
Public propertyExternalRigidbody In continuous manipulation mode, allows to get the linear/rotational speed from an external rigidbody instead of the object being grabbed. This is useful to emulate the tension propagated by a connected physics-driven object. For example, in a flail weapon, the grabbable object is the handle which also has the UxrManipulationHapticFeedback component, but the physics-driven head is the object that should be monitored for haptics to generate better results.
Public propertyHapticClipOnGrab Gets or sets the haptic clip played when the object is grabbed.
Public propertyHapticClipOnPlace Gets or sets the haptic clip played when the object is placed.
Public propertyHapticClipOnRelease Gets or sets the haptic clip played when the object is released.
Public propertyHapticMixMode Gets or sets the haptic feedback mix mode.
Public propertyMaxAmplitude Gets or sets continuous manipulation haptic feedback’s maximum amplitude, which is the haptic amplitude sent when the object is moving/rotating at or over MaxSpeed/MaxAngularSpeed.
Public propertyMaxAngularSpeed Gets the maximum manipulation angular speed. This is the same as MaxSpeed but when rotating an object.
Public propertyMaxFrequency Gets or sets continuous manipulation haptic feedback’s maximum frequency, which is the haptic frequency sent when the object is moving/rotating at or over MaxSpeed/MaxAngularSpeed.
Public propertyMaxSpeed Gets or sets the maximum manipulation speed, which is the object travel speed while being manipulated above which the haptics will be sent with MaxFrequency and MaxAmplitude. Speeds down to MinSpeed will send haptic feedback with frequency and amplitude values linearly decreasing down to MinFrequency and MinAmplitude. This allows to send haptic feedback with an intensity/frequency depending on how fast the object is being moved.
Public propertyMinAmplitude Gets or sets continuous manipulation haptic feedback’s minimum amplitude, which is the haptic amplitude sent when the object is moving/rotating at or below MinSpeed/MinAngularSpeed.
Public propertyMinAngularSpeed Gets the minimum manipulation angular speed. This is the same as MinSpeed but when rotating an object.
Public propertyMinFrequency Gets or sets continuous manipulation haptic feedback’s minimum frequency, which is the haptic frequency sent when the object is moving/rotating at or below MinSpeed/MinAngularSpeed.
Public propertyMinSpeed Gets or sets the minimum manipulation speed, which is the object travel speed while being manipulated below which the haptics will be sent with MinFrequency and MinAmplitude. Speeds up to MaxSpeed will send haptic feedback with frequency and amplitude values linearly increasing up to MaxFrequency and MaxAmplitude. This allows to send haptic feedback with an intensity/frequency depending on how fast the object is being moved.
Public propertyUseExternalRigidbody See ExternalRigidbody.

Methods

NameDescription
Protected methodOnDisable Stops the haptic coroutines. (Overrides UxrGrabbableObjectComponent<T>.OnDisable().)
Protected methodOnObjectConstraintsFinished Called after all object manipulation has been processed and potential constraints have been applied. It is used to update the speed information. (Overrides UxrGrabbableObjectComponent<T>.OnObjectConstraintsFinished(UxrApplyConstraintsEventArgs).)
Protected methodOnObjectGrabbed Called when the object was grabbed. Sends haptic feedback if it’s required. (Overrides UxrGrabbableObjectComponent<T>.OnObjectGrabbed(UxrManipulationEventArgs).)
Protected methodOnObjectPlaced Called when the object was placed. Sends haptic feedback if it’s required. (Overrides UxrGrabbableObjectComponent<T>.OnObjectPlaced(UxrManipulationEventArgs).)
Protected methodOnObjectReleased Called when the object was released. Sends haptic feedback if it’s required. (Overrides UxrGrabbableObjectComponent<T>.OnObjectReleased(UxrManipulationEventArgs).)

Extension Methods

NameDescription
Public Extension MethodCheckSetEnabled Enables/disabled the component if it isn’t enabled already. (Defined by MonoBehaviourExt.)
Public Extension MethodGetOrAddComponent<T> Gets the Component of a given type. If it doesn’t exist, it is added to the GameObject. (Defined by ComponentExt.)
Public Extension MethodGetPathUnderScene Gets the full path under current scene, including all parents, but scene name, for the given component. (Defined by ComponentExt.)
Public Extension MethodGetSceneUid Gets an unique identifier string for the given component. (Defined by ComponentExt.)
Public Extension MethodGetUniqueScenePath Gets an unique path in the scene for the given component. It will include scene name, sibling and component indices to make it unique. (Defined by ComponentExt.)
Public Extension MethodLoopCoroutine Creates a coroutine that simplifies executing a loop during a certain amount of time. (Defined by MonoBehaviourExt.)
Public Extension MethodSafeGetComponentInParent<T> Gets the Component of a given type in the GameObject or any of its parents. It also works on prefabs, where regular GetComponentInParent(Type, Boolean) will not work: https://issuetracker.unity3d.com/issues/getcomponentinparent-is-returning-null-when-the-gameobject-is-a-prefab (Defined by ComponentExt.)
Public Extension MethodShowInInspector(Boolean)Overloaded.
Controls whether to show the current object in the inspector. (Defined by ObjectExt.)
Public Extension MethodShowInInspector(Boolean, Boolean)Overloaded.
Controls whether to show the current object in the inspector and whether it is editable. (Defined by ObjectExt.)
Public Extension MethodThrowIfNull Throws an exception if the object is null. (Defined by ObjectExt.)

See Also

Reference

UltimateXR.Haptics.Helpers Namespace