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
Name | Description | |
---|---|---|
UxrManipulationHapticFeedback |
Properties
Name | Description | |
---|---|---|
ContinuousManipulationHaptics | Gets or sets whether the component will send haptic feedback continuously while the object is being grabbed. | |
ExternalRigidbody | 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. | |
HapticClipOnGrab | Gets or sets the haptic clip played when the object is grabbed. | |
HapticClipOnPlace | Gets or sets the haptic clip played when the object is placed. | |
HapticClipOnRelease | Gets or sets the haptic clip played when the object is released. | |
HapticMixMode | Gets or sets the haptic feedback mix mode. | |
MaxAmplitude | 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. | |
MaxAngularSpeed | Gets the maximum manipulation angular speed. This is the same as MaxSpeed but when rotating an object. | |
MaxFrequency | 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. | |
MaxSpeed | 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. | |
MinAmplitude | 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. | |
MinAngularSpeed | Gets the minimum manipulation angular speed. This is the same as MinSpeed but when rotating an object. | |
MinFrequency | 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. | |
MinSpeed | 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. | |
UseExternalRigidbody | See ExternalRigidbody. |
Methods
Name | Description | |
---|---|---|
OnDisable | Stops the haptic coroutines. (Overrides UxrGrabbableObjectComponent<T>.OnDisable().) | |
OnObjectConstraintsFinished | 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).) | |
OnObjectGrabbed | Called when the object was grabbed. Sends haptic feedback if it’s required. (Overrides UxrGrabbableObjectComponent<T>.OnObjectGrabbed(UxrManipulationEventArgs).) | |
OnObjectPlaced | Called when the object was placed. Sends haptic feedback if it’s required. (Overrides UxrGrabbableObjectComponent<T>.OnObjectPlaced(UxrManipulationEventArgs).) | |
OnObjectReleased | Called when the object was released. Sends haptic feedback if it’s required. (Overrides UxrGrabbableObjectComponent<T>.OnObjectReleased(UxrManipulationEventArgs).) |
Extension Methods
Name | Description | |
---|---|---|
CheckSetEnabled | Enables/disabled the component if it isn’t enabled already. (Defined by MonoBehaviourExt.) | |
GetOrAddComponent<T> | Gets the Component of a given type. If it doesn’t exist, it is added to the GameObject. (Defined by ComponentExt.) | |
GetPathUnderScene | Gets the full path under current scene, including all parents, but scene name, for the given component. (Defined by ComponentExt.) | |
GetSceneUid | Gets an unique identifier string for the given component. (Defined by ComponentExt.) | |
GetUniqueScenePath | 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.) | |
LoopCoroutine | Creates a coroutine that simplifies executing a loop during a certain amount of time. (Defined by MonoBehaviourExt.) | |
SafeGetComponentInParent<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.) | |
ShowInInspector(Boolean) | Overloaded. Controls whether to show the current object in the inspector. (Defined by ObjectExt.) | |
ShowInInspector(Boolean, Boolean) | Overloaded. Controls whether to show the current object in the inspector and whether it is editable. (Defined by ObjectExt.) | |
ThrowIfNull | Throws an exception if the object is null. (Defined by ObjectExt.) |