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

将对象附加到头戴设备

Sometimes, it might be necessary to attach some object to the HMD to follow it. It can be a menu (like the head_menu node in the sample), glasses with colored lenses, or a smoking cigar. To attach a node to the HMD position, assign the AttachToHead property to this node and specify the required settings: distance, forward direction axis (to properly orient the node facing the viewer), and flags indicating whether the node position is fixed and updated when the component is enabled.有时我们可能需要将某个对象附加到 HMD(头戴显示器)上以使其始终跟随头部移动。例如,可以是一个菜单(如示例中的 head_menu 节点)、带有彩色镜片的眼镜,或者是一根燃着的雪茄。要将节点附加到 HMD 的位置,请将 AttachToHead property 分配给该节点,并设置所需的参数:距离、朝前方向的轴(用于正确朝向用户)以及标志用于指示节点的位置是否固定,以及组件启用时是否更新位置。

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

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