License requirement
The functionality described requires a MANUS Bodypack
or a MANUS license dongle
containing one of these licenses to be connected:
Core Pro
Core XR
Core Xsens Pro
Core Qualisys Pro
Core OptiTrack Pro
Demo
Interaction framework
Our interaction framework is a powerful tool that allows you to easily implement interactive elements in your Unity projects. With this framework, you can create realistic hand interactions, such as picking up objects, interacting with buttons and switches, teleporting, and more. To help you get started, we provide an example scene that showcases the capabilities of the interaction framework. This scene demonstrates various interactable objects, including grabbables, switches, turnables, sliders, and buttons. By following the step-by-step instructions below, you can set up the hand and interactables in your own Unity project. Each section provides clear guidance on how to add the necessary scripts and components to achieve the desired functionality.
Setting up the hand
To enable hand interactions in your Unity project using the Unity Interaction Framework, you need to follow these steps:
-
Add the
HandGrab
script to the wrist bone of your character model. This script allows the hand to grab objects. -
For the ghost hand effect, add the
InteractionHand
script to the same object that contains theSkeleton
script. This script provides visual feedback for hand interactions. -
Optionally, you can modify the grab radius or the physics layer to customize the hand interactions.
You have now set up the hand in your Unity project and can start implementing interactive elements.
Interacting with buttons/switches
To interact with objects, you need collision. You can do this manually by adding colliders to the objects, or you can use the ColliderGenerator
script provided with the plugin. Simply add the ColliderGenerator
script to the same game object that contains the skeleton script.
Teleporting
To enable teleportation controls place the teleporter
prefab as a child of the wrist bone in your Unity project.
Setting up interactables
The Interaction Framework provides a variety of interactable objects that you can easily incorporate into your Unity projects. These objects include grabbables, switches, turnables, sliders, and buttons. This section will guide you through the process of setting up each type of interactable.
Grabbables
Grabbables are objects that can be picked up and manipulated by the player. They are typically used for objects that the player can hold or move around in the game world. To make an object grabbable, follow these steps:
-
Add the
GrabbableObject
script to the object that you want to make grabbable. This script enables the object to be grabbed by the player. -
(Optional) If you want to make the object throwable, you can also add the
ThrowableObject
script. This script allows the player to throw the object after grabbing it.
Switches
Switches are interactive objects that can be toggled between two states, such as on/off or open/closed. They are commonly used for controlling lights, doors, or other game mechanics. To set up a switch, follow these steps:
-
Add the
RockerSwitch
component to the object that represents the switch. -
Add two collision areas for both sides of the switch with colliders. These collision areas define the regions where the player can interact with the switch.
-
Set the pivot point around which the switch should rotate.
- Set the rotation amount that determines the range of motion for the switch.
Turnables
Turnables are objects that can be rotated by the player. They are often used for knobs, dials, or other objects that can be turned. To make an object turnable, follow these steps:
-
Add the
TurnableObject
component to the object that you want to be rotatable. -
Set the turn axis and the up axis. The up axis should be perpendicular to the turn axis.
- Make sure the object has a collider component.
Sliders
Sliders are interactive objects that can be moved along a linear path. They are commonly used for volume controls, settings, or other adjustable parameters. To set up a slider, follow these steps:
-
Add the
MovableObject
component to the object that you want to be movable. -
Set the start and end position of the slider. These positions define the range of motion for the slider.
- Make sure the object has a collider component.
Buttons
Buttons are interactive objects that can be pressed or released by the player. They are often used for triggering actions or events in the game. To set up a button, follow these steps:
-
Add the
PushButton
component to the button object. -
Assign the moving part of the button. This is the part that visually moves when the button is pressed.
-
Assign the two collision areas for pressing and releasing the button.
Prefabs
The Interaction Framework ships with prefabs for each type of interactable object mentioned above. You can inspect these prefabs to understand how they are set up and use them in your own projects. Simply navigate to the appropriate folder in the Unity Editor and drag the desired prefab into your scene.
By following these instructions, you can easily incorporate interactive elements into your Unity projects using our Interaction Framework.