-
Notifications
You must be signed in to change notification settings - Fork 4
Tutorial Body Warping & World Warping
The setup for both redirection techniques is the same and only differs in the selected Redirection Technique. In the following, the setup of a Body Warping Redirection will be explained in more detail.
Our example scene has three turquoise virtual cubes that we want to map to one white physical cube.
For this, a connection between each virtual cube and the physical cube is created. This process can be seen in the video below. Each step that is introduced in the video is explained in more detail below the video, for further help.
This image will redirect you to the tutorial video on YouTube.
-
Drag & Drop the
HaRT_core prefab
into the hierarchy. It can be found in theAssets/Prefabs/
folder. -
Setup all virtual objects that will be used for the redirection. For each virtual object:
2.1. Attach a
RedirectionObject.cs
script to the virtual object in your Unity scene.2.2. Drag & Drop the
VirtualToRealConnection
prefab onto the virtual object to place it as a child object. It stores the position information of the virtual and real connection.2.3. Open the
VirtualToRealConnection
object instance that you have just placed in the hierarchy. Drag & Drop the transform of theReal Physical Cube
object in your scene (which represents the physical counterpart, i.e. the target for the redirection) onto the public fieldReal Position
in the inspector.2.4. Select the
VirtualToRealConnection
object you have placed in the scene and assign it to theRedirectionObject Positions
field on your virtual object.2.5. Repeat this for all virtual objects.
-
Add a Body Warping (or World Warping) Redirection Technique, i.e. drag & drop it from the
Prefabs
folder into the hierarchy. -
Setup the
RedirectionManager
, it is a child object of theHaRT_core
prefab that is already in your scene.4.1. Add the
Virtual World
object in your scene to theVirtual World
public field of theRedirectionManager
.4.2. Place all virtual objects you defined previously (see previous steps) into the
AllRedirectedPrefabs
array.4.3. Add the
RedirectionTechnique
in your scene to theDefault Redirection Technique
field. -
Hit play to start the redirection! To select a new target, hit the spacebar.