API reference
API reference
Select your platform
No SDKs available
No versions available

RecoilAssistConfig Class

Recoil assist will affect unselection and reselection criteria, which is useful for triggering unselect in response to a smaller motion in the negative direction from a surface.
This configuration can vary by instance and can be set either through the UnityEditor or by programmatically setting the PokeInteractable.RecoilAssist property.

Fields

Sets whether or not this config block is enabled.
If disabled, all values will be ignored and default behavior will apply.
If true, DynamicDecayCurve will be used to decay the max distance based on the normal velocity.
Otherwise, default behavior will apply.
A Unity AnimationCurve of the normal movement ratio to determine the rate of decay.
Expand recoil window when fast Z motion is detected.
When poking a surface rapidly, users are much more likely to over-penetrate to move their hands spatially further past the virtual PokeInteractable.SurfacePatch than they might normally do, simply because they're moving fast. Under such circumstances, both motion tracking and user proprioception tend to contain large spatial errors, and typical interaction windows may consequently be inadequate in such scenarios. This leads to the concept of "velocity expansion," which pads or "expands" the error margins for certain interaction parameters (notably recoil assist) based on the velocity of the user's interaction.
When average velocity in interactable Z is greater than min speed, the recoil window will begin expanding.
See UseVelocityExpansion for a more detailed overview of what "velocity expansion" means.
Full recoil window expansion reached at this speed.
See UseVelocityExpansion for a more detailed overview of what "velocity expansion" means.
Window will expand by this distance when Z velocity reaches max speed.
See UseVelocityExpansion for a more detailed overview of what "velocity expansion" means.
Window will contract toward ExitDistance at this rate (in meters) per second when velocity lowers.
See UseVelocityExpansion for a more detailed overview of what "velocity expansion" means.
The distance over which a poke interactor must surpass to trigger an early unselect, measured along the normal to the surface (in meters).
When in recoil, the distance which a poke interactor must surpass to trigger a subsequent select, measured along the negative normal to the surface (in meters).
Did you find this page helpful?
Thumbs up icon
Thumbs down icon