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

限制传送功能

In VR projects, sometimes we use teleporting to move around, especially in large scenes.在 VR 项目中,尤其是在大型场景中,有时会使用传送(teleporting)来实现移动。

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.如果对象的 Intersection maskvr_player_spawner.prop 属性中的 Teleportation mask 设置相匹配,则可以传送到该对象。默认使用 Teleportation mask 的第二位。因此,只能传送到启用了 Intersection 且其掩码设置了第二位的对象。

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.使用默认平面(core/meshes/plane.mesh)或任意网格创建一个新的 Static Mesh 对象,以定义受限制区域。
  2. Place the Static Mesh in the scene just above the floor.将该 Static Mesh 放置在场景中,稍微高于地面。
  3. Go to the Parameters window and make sure that the second bit of the Intersection mask is disabled.进入 Parameters 窗口,确保 Intersection mask 的第二位未启用。

  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.若要隐藏该 Static Mesh,请关闭其 ViewportShadow 掩码的所有位。

  6. Save changes and run the application: the rectangular plane is invisible now.保存更改并运行应用程序:现在该矩形平面不可见。

本页面上的信息适用于 UNIGINE 2.20 SDK.

最新更新: 2025-06-20
Build: ()