Skip to content

Tutorial Body Warping & World Warping

André Zenner edited this page Apr 15, 2021 · 3 revisions

How to setup a Body-/World Warping Redirection Scenario

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.

BodyWarping Initial Situation

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.

Tutorial Video:

Interpolation Tutorial

This image will redirect you to the tutorial video on YouTube.

Detailed Explanation of the Steps

  1. Drag & Drop the HaRT_core prefab into the hierarchy. It can be found in the Assets/Prefabs/ folder.

  2. 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 the Real Physical Cube object in your scene (which represents the physical counterpart, i.e. the target for the redirection) onto the public field Real Position in the inspector.

    2.4. Select the VirtualToRealConnection object you have placed in the scene and assign it to the RedirectionObject Positions field on your virtual object.

    2.5. Repeat this for all virtual objects.

  3. Add a Body Warping (or World Warping) Redirection Technique, i.e. drag & drop it from the Prefabs folder into the hierarchy.

  4. Setup the RedirectionManager, it is a child object of the HaRT_core prefab that is already in your scene.

    4.1. Add the Virtual World object in your scene to the Virtual World public field of the RedirectionManager.

    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 the Default Redirection Technique field.

  5. Hit play to start the redirection! To select a new target, hit the spacebar.