Develop
Develop
Select your platform

Poke Interactions

Updated: Oct 7, 2024

What are Poke Interactions?

Poke Interactions enable you to push or press objects in the world using your finger or controller. The most common use case for poke interactions is pressing buttons, either in a user interface or in the environment. For instance, the player may need to press a button to open a door to advance to another area or to start the engine of a space cruiser. Other possible uses for poke interactions are to use your finger to pop bubbles or push balloons floating around, finger painting on a canvas, sculpting digital clay, and more.
Poke INteractions Sample Scene

How do Poke Interactions work?

Like most other interactions, a Poke Interaction consists of two main elements: an interactor and an interactable. The IsdkPokeInteractor lives on the Pawn within the hand or controller rigs. The IsdkPokeInteractable is placed on any Actor you want to interact with using a poke interaction. When an IsdkPokeInteractor interacts with a IsdkPokeInteractable, a Pointer Event is generated with information about the interaction.
To aid in detecting a poke interaction, other components are required to be placed and configured on the Actor you want to be able to interact with. An IsdkClippedPlaneSurface in conjunction with an IsdkPointablePlane defines the surface that must be intersected to generate the poke interaction.
No visible geometry is technically required for a poke interaction to function; however, the player needs a way to identify an item that can be interacted with. Any visual can be used to represent the interactable item – a simple plane, a fully modeled button, etc. – and it is possible using an IsdkPokeButtonVisual component to create a button that recoils as you press it just like a physical button would. See Adding Recoil for more information on using an IsdkPokeButtonVisual component to add recoil to your poke interaction.

Poke Interactor

An IsdkPokeInteractor defines the point in space to be used for computing both hovering and selection via surface intersection with an IsdkPokeInteractable. There is one IsdkPokeInteractor on the tip of the index finger of both the IsdkHandRigComponentLeft and IsdkHandRigComponentRight and one at the tip of the controller on both the IsdkControllerRigComponentLeft and IsdkControllerRigComponentRight.
Poke Interactor on index finger
An IsdkPokeInteractor determines the best IsdkPokeInteractable to hover over by computing the closest IsdkPokeInteractable by distance, as defined by an IsdkClippedPlaneSurface. Additionally, an IsdkPokeInteractor determines that a selection should occur when the point transform across two consecutive frames intersects the PointablePlane of the IsdkPokeInteractable in the direction of the surface normal. This way it can handle both fast presses as well as require that presses originate only from above a surface.

Poke Interactable

An IsdkPokeInteractable represents a pokeable surface, like a button or a user interface. An IsdkPokeInteractable component must be placed on each item you want to be pokeable. The IsdkPokeInteractable component requires a component that implements the IIsdkISurfacePatch interface, which specifies the shape & transform of the surface that the poke can collide with. One implementation of IIsdkISurfacePatch is the IsdkClippedPlaneSurface component, which defines one or more clipped regions on an IsdkPointablePlane. Both of these components should also be added to the item that you want to make interactable.
The basic process to make an item interactable using poke is:
  1. Create an IsdkPointablePlane component. This has a single Vector2 property, Size, which can be set through code or the Blueprint Construction Script or Event Graph. It represents the distance from the centerpoint to the edge on both the X and Y dimensions. The total size of the resulting bounding box of the collider is double the Size.
  2. Create an array of clipping regions that you want to define on the PointablePlane. There is a helper function in the OculusInteractionFunctionLibrary to assist in defining clipped regions.
  3. Create an IsdkClippedPlaneSurface component, assigning both the PointablePlane and the bounds clippers.
  4. Create the IsdkPokeInteractable, assigning the clipped plane surface to the SurfacePatch property.
  5. Configure the PokeInteractable threshold values for your object. It is important to set the Normal & Tangent values on the PokeInteractable > Config struct to match your specific object.

Config Asset

The Config Asset of the IsdkPokeInteractable provides settings to configure the behavior of the poke interaction.
SectionDescription
MinThresholdsConfig
Determines when to enter a hover
PositionPinningConfig
Creates a sense of friction
DragThresholdsConfig
Distinguishes between dragging and pressing, and suppresses move pointer events when a poke interactor follows a pressing motion
RecoilAssistConfig
Adjusts unselection and reselection criteria
Since this is a Data Asset, the values set here are global to all objects referencing the Data Asset. If you change the settings in the default asset, IsdkPokeInteractablePanelConfig, those values will be applied to all existing and future IsdkPokeInteractable components. This means if you want to have customized behavior for an individual poke interaction or group of poke interactions, you will need to create a new Data Asset and assign it as the Config Asset for the IsdkPokeInteractable for those poke interactions. To create a new Data Asset for the Config Asset, you must use the ISDK Poke Interactable Config Data Asset class.
Poke Config Asset

Touch Limiting

Touch limiting locks the position of the visual hand’s wrist when the IsdkPokeInteractor interacts with the PointablePlane, constraining the hand from moving and the finger from penetrating into the geometry of the item being poked. This provides a more appealing interaction from a visual standpoint, and also improves the experience of the interaction for the user.
Touch limiting
To enable touch limiting, an IsdkPokeLimiterVisual component is required along with the IsdkPokeInteractor. The prebuilt rigs have this set up by default.

Adding Recoil

You can add recoil, or have a button move as you poke it, using an IsdkPokeButtonVisual component. This component takes a reference to the IsdkPokeInteractable and IsdkPointablePlane. The IsdkPointablePlane acts as the poke limiting plane, or the stopping point of button travel. The geometry attached to the IsdkPokeButtonVisual will move as it’s pressed, stopping at the IsdkPointablePlane, after which poke limiting will begin.
Recoil using Poke Button Visual component
Note: See the PokeExamples scene of the Interaction Samples for examples of poke interactions demonstrating the use of an IsdkPokeButtonVisual to add recoil to buttons.

Learn more

Now that you know how to set up grab interactions with Interaction SDK, continue on to the following guides:
Did you find this page helpful?
Thumbs up icon
Thumbs down icon