This page has been translated automatically.
UNIGINE 基础课程
1. 简介
2. 虚拟世界管理
3. 3D模型准备
4. 材质
5. 摄像机和光照系统
6. 实现应用程序逻辑
7. 制作过场动画与动画序列
8. 准备发布项目
9. 物理系统
10. 优化基础
11. 项目2:第一人称射击游戏
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.

The information on this page is valid for UNIGINE 2.20 SDK.

Last update: 2024-11-06
Build: ()