Component:HapticManager: Difference between revisions

From Resonite Wiki
mNo edit summary
update sync delegates
 
(3 intermediate revisions by 2 users not shown)
Line 10: Line 10:
== Fields ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|InjectedBodyPartIntensity|Float|Adjusts the haptic intensity of bodyparts that aren't the head and hands.|InjectedHandIntensity|Float|Adjusts the haptic intensity of the hands.|InjectedHeadIntensity|Float|Adjusts the haptic intensity of the head.
|InjectedBodyPartIntensity|Float|Adjusts the haptic intensity of bodyparts that aren't the head and hands.
|InjectedHandIntensity|Float|Adjusts the haptic intensity of the hands.
|InjectedHeadIntensity|Float|Adjusts the haptic intensity of the head.
|InjectedRadiusStartRatio|Float|Adjusts the start radius of all injected haptics.
|InjectedRadiusStartRatio|Float|Adjusts the start radius of all injected haptics.
|InjectedRadiusEndRatio|Float|
|InjectedRadiusEndRatio|Float|
Adjusts the end radius of all injected haptics.|InjectedRadiusPower|Float|Adjusts the overall radius of all injected haptics.
Adjusts the end radius of all injected haptics.
|ShowDebugVisuals|Bool|Locally shows injected haptics for each user, Rebuild Injected Sources needs to be checked for this to work.}}
|InjectedRadiusPower|Float|Adjusts the overall radius of all injected haptics.
|ShowDebugVisuals|Bool|Locally shows injected haptics for each user, Rebuild Injected Sources needs to be checked for this to work.
}}
 
== Sync Delegates ==
{{Table ComponentTriggers
|OnRebuild:[[Type:ButtonEventHandler|ButtonEventHandler]]|[[Type:ButtonEventHandler|ButtonEventHandler]]|true| Recreates all the samplers on the user for haptic devices.
}}


== Usage ==
== Usage ==
Line 29: Line 38:
[[Category:Components:Uncategorized{{#translation:}}|Haptic Manager]]
[[Category:Components:Uncategorized{{#translation:}}|Haptic Manager]]
[[Category:Components{{#translation:}}|Haptic Manager]]
[[Category:Components{{#translation:}}|Haptic Manager]]
[[Category:ComponentStubs]]

Latest revision as of 22:09, 19 March 2025

Component image 
Haptic Manager component as seen in the Scene Inspector

This works as part of the game's robust Haptics system.

Can be found under each user's User root slot, the HapticManager controls the locally injected haptics for everyone in the session besides yourself if this component is found underneath your own user root slot.

The HapticManager also allows you to locally see the debug visuals of each user in the form of green transparent shapes. However you need to check ShowDebugVisuals then hit Rebuild Injected Sources to see this change reflected, do the inverse to remove the debug visuals.

Fields

Fields
Name Type Description
persistent Bool Determines whether or not this item will be saved to the server.
UpdateOrder Int Controls the order in which this component is updated.
Enabled Bool Controls whether or not this component is enabled. Some components stop their functionality when this field is disabled, but some don't.
InjectedBodyPartIntensity Float Adjusts the haptic intensity of bodyparts that aren't the head and hands.
InjectedHandIntensity Float Adjusts the haptic intensity of the hands.
InjectedHeadIntensity Float Adjusts the haptic intensity of the head.
InjectedRadiusStartRatio Float Adjusts the start radius of all injected haptics.
InjectedRadiusEndRatio Float Adjusts the end radius of all injected haptics.
InjectedRadiusPower Float Adjusts the overall radius of all injected haptics.
ShowDebugVisuals Bool Locally shows injected haptics for each user, Rebuild Injected Sources needs to be checked for this to work.

Sync Delegates

Triggers
Method Name Method type and Arguments. Is the method hidden? Description
OnRebuild:ButtonEventHandler ButtonEventHandler Recreates all the samplers on the user for haptic devices.

Usage

Note this component functions locally and does not affect injected haptics on your own avatar, to do that you need to use the AvatarHapticSourceManager to override the injected behavior for your own avatar. If found on other user root slots other than yourself, this component does nothing and won't do any changes.

HapticManger can be used to debug weird haptic collisions from other users in the session, or possibly help with the issues where there is "stuck" haptics from touching injected haptic zones by rebuilding the haptic zones.

With the help of the ShowDebugVisuals you can see the haptic culling behavior if you step away from another user far enough.

Examples

See Also