Version: 2017.2
焦点
Persistence

锚点

Anchor components are a way for the virtual world to interact with the real world. An Anchor is a special component that overrides the position and orientation on the Transform component on the same GameObject. For GameObjects with an Anchor component, the system takes over and locks them in place in the real world, based on the system’s understanding. For more information, see Microsoft’s documentation on WorldAnchors in Unity.

WorldAnchor

世界锚点 (World Anchor) 组件可以表示物理世界中一个具体点与世界锚点的父游戏对象之间的联系。添加世界锚点组件后,包含该组件的游戏对象将一直锁定到现实世界中的位置。例如,世界锚点可用于:

  • 将全息游戏板锁定在桌子上
  • 将视频窗口锁定到墙上

只要有想要固定到物理位置的游戏对象或游戏对象树,就可以使用世界锚点。

世界锚点会覆盖其父游戏对象的变换组件,因此对变换组件的任何直接操作都将丢失。同样,带世界锚点组件的游戏对象不应包含带__动态__物理系统的刚体组件。这些刚体组件可能很耗资源并影响游戏性能,因此请确保仅使用少量的锚点组件。例如,放置在桌子上的游戏板表面仅需要用于游戏板的单个锚点;游戏板的子游戏对象不需要有自己的世界锚点。

焦点
Persistence