This page has been translated automatically.
Unigine Basics
1. Introduction
2. Managing Virtual Worlds
3. Preparing 3D Models
4. Materials
5. Cameras and Lighting
6. Implementing Application Logic
7. Making Cutscenes and Recording Videos
8. Preparing Your Project for Release
9. Physics
10. Optimization Basics
11. PROJECT2: First-Person Shooter
12. PROJECT3: Third-Person Cross-Country Arcade Racing Game

Restricting Teleportations

In VR projects, sometimes we use teleporting to move around, especially in large scenes.

You can teleport to an object if its Intersection mask matches the Teleportation mask in the settings of the vr_player_spawner.prop property. By default, the second bit of the Teleportation mask is used. So, you can teleport to objects for which the Intersection option is enabled, and the second bit of the Intersection mask is set.

To restrict teleportation to a certain area, do the following:

  1. Create a new Static Mesh object by using the default plane (core/meshes/plane.mesh) or an arbitrary mesh that will define the restricted area.
  2. Place the Static Mesh in the scene just above the floor.
  3. Go to the Parameters window and make sure that the second bit of the Intersection mask is disabled.

  4. Save and run the application. Now, you cannot teleport to the area defined by the rectangular plane (the ray and the target point are red).

  5. To hide the Static Mesh, disable all bits of its Viewport and Shadow masks.

  6. Save changes and run the application: the rectangular plane is invisible now.

Last update: 2024-12-13
Build: ()