Interaction Engine

With the Interaction Engine users can interact with physical or pseudo-physical objects. Whether that’s a block, a virtual trackball, a button on an interface panel, or a hologram with more complex affordances.

If there are objects in your application you need your user to be able to hover near, touch, or grasp, the Interaction Engine can do that work for you.

This page will briefly explain how to enable your hands to interact with objects, and the different types of interactions that are possible.


The Basic Components of Interaction

In order to enable the interaction engine, two components are required: LeapGrabberComponent and LeapGrabComponent.

LeapGrabberComponent will be attached to the hands that will do the grabbing and the LeapGrabComponent will be attached to the object that will be grabbed.

LeapGrabberComponent

This component can be found in /UltraleapTracking/InteractionEngine/BluePrints/LeapComponentsIE/LeapGrabberComponent.

This component must be added to hands actors, next to the left and right hands. Only one component is needed for both hands. As an example we will show how to add it to our hands actor LeapHandsIE2, this can be found in /UltraleapTracking/InteractionEngine/BluePrints/LeapHandsIE2

Open LeapHandsIE2, click on Add Component, search for LeapGrabberComponent then add it.

../../../../../_images/Unreal_IE_Add_Grabber.gif

Click on the LeapGrabberComponent and adjust the bone names for LeftHandBaseSocket and LeftHandAttachSocket. Do the same thing with the right ones.

The grabbed object will ‘follow’ the location & rotation of the BaseSocket (bone). We recommend this to be the Palm. AttachSocket is the bone nearest to the grabbed objects. We recommend this to be the end of the Index finger.

../../../../../_images/11.png

Note

  1. In order to get the correct bone names for the left & right hand, you may have to open the skeletal mesh of the hand, where all the bone names are listed. Some generic skeletal mesh(es) used for both left & right hands may use the same bone names for the left and right hands. For example, the ghost hands provided with this plugin.

  2. The hand must have LeapComponent, in order to activate the Grabbing events.

LeapGrabComponent

This component can be found in /UltraleapTracking/InteractionEngine/BluePrints/LeapComponentsIE/LeapGrabComponent. Attaching this component to an actor or static mesh in the scene will enable them to be interacted with. An example actor where LeapGrabComponent is added can be found in /UltraleapTracking/InteractionEngine/BluePrints/Grabbable_SmallCube. You can also add this component to your actors, by clicking Add Component then searching for LeapGrabComponent

../../../../../_images/Unreal_IE_Add_Grab.gif

The grab component has 4 types of grabbing: Free, Snap, TwoHandsGrab and StickyGrab. Click on the LeapGrabComponent that you added then adjust the grab type.

../../../../../_images/12.png

Note

LeapVRPawn is set up to use our latest way of interacting. It can be found in /UltraleapTracking/InteractionEngine/BluePrints/LeapVRPawn. This pawn has a child actor that contains ghost hands rigged in addition to the grabber component. This also contains our latest UI interaction component, used for far and near widget interactions.

Check Out The Examples

The examples folder (UltraleapTracking Content/InteractionEngine/ExampleScenes) contains a series of example scenes that demonstrate the features of the Interaction Engine.

All of the examples can be used with Ultraleap tracked hands using an Ultraleap Hand Tracking Camera.

Additional Interaction Engine Features

The latest release of the interaction engine is designed to make it easier to manipulate virtual objects using your hands than ever before. As long as you’ve rigged hands, you can follow the previous steps to add interaction to any hand meshes that you want.

Hovering

Hovering the grabber hand near a grab objects will trigger proximity events, changing the color of the grab object to red when the hand is near it. When the color changes to green, this means that the object can be grabbed.

Legacy Interaction Engine

Our legacy interaction engine still exists in the plugin, with grabber and grab components. This can be found in /UltraleapTracking/InteractionEngine/LegacyComponents/ folder. We’re moving away from using legacy components and we recommend to use the components mentioned above in this page.


Back to top