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

PokeInteractable Class

Defines a near-poke interaction target that is driven by a near-distance proximity computation and a raycast between the position recorded across two frames against a target surface.
The interactor type for this interactable is PokeInteractor.

Properties

An ISurfacePatch, which provides both the backing surface (generally infinite) and pokable area (generally finite) of the interactor.
The distance required for a PokeInteractor to enter hovering, measured along the tangent plane to the surface (in meters).
The distance required for a PokeInteractor to enter hovering, measured along the tangent plane to the surface (in meters).
The distance required for a PokeInteractor to exit hovering, measured along the normal to the surface (in meters).
The distance required for a PokeInteractor to exit hovering, measured along the tangent plane to the surface (in meters).
If greater than zero, the distance required for a selecting PokeInteractor to cancel selection, measured along the negative normal to the surface (in meters).
If greater than zero, the distance required for a selecting PokeInteractor to cancel selection, measured along the tangent plane to the surface (in meters).
The threshold below which distances near this surface are treated as equal in depth for the purposes of ranking, in world-space meters.
If a PokeInteractor is positioned near multiple interactables such that it is equally interactable with any of them (i.e., the distances to all of them are within CloseDistanceThreshold of each other), the interactable with the largest TiebreakerScore wins and is targeted for interaction.
If there's a tie for largest TiebreakerScore, one of the interactables will be selected arbitrarily.
The MinThresholdsConfig for this interactable instance.
This value is typically set from the UnityEditor, but it can also be set and modified programmatically.
The DragThresholdsConfig for this interactable instance.
This value is typically set from the UnityEditor, but it can also be set and modified programmatically.
The PositionPinningConfig for this interactable instance.
This value is typically set from the UnityEditor, but it can also be set and modified programmatically.
The RecoilAssistConfig for this interactable instance.
This value is typically set from the UnityEditor, but it can also be set and modified programmatically.

Protected Functions

override void Awake ( )
override void Start ( )

Member Functions

Convenience method wrapping a call to ISurface.ClosestSurfacePoint(in Vector3, out SurfaceHit, float) on the SurfacePatch.
Parameters
point
The point, in world space, for which the nearest point on the surface must be found
hit
The returned hit data in world space if a nearest point could be found, default otherwise
Returns
True if the racyast hit the surface, false otherwise
Convenience method wrapping a call to ISurface.ClosestSurfacePoint(in Vector3, out SurfaceHit, float) on the ISurfacePatch.BackingSurface of this interactable's SurfacePatch.
Parameters
point
The point, in world space, for which the nearest point on the surface must be found
hit
The returned hit data in world space if a nearest point could be found, default otherwise
Returns
True if the racyast hit the surface, false otherwise
Sets all the required values for a PokeInteractable on a dynamically instantiated GameObject.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Sets a surface patch for a dynamically instantiated GameObject.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon