返回介绍

NavMeshAgent.updatePosition 更新位置

发布于 2019-12-18 15:38:06 字数 1367 浏览 1529 评论 0 收藏 0

JavaScript => public var updatePosition: bool;
C# => public bool updatePosition;

Description 描述

Gets or sets whether the transform position is synchronized with the simulated agent position. The default value is true.

获取或者设置变换位置与模拟代理位置同步。默认值为true。

When true: changing the transform position will affect the simulated position and vice-versa.

当为true时:改变变换位置将会影响模拟位置,反之亦然。

When false: the simulated position will not be applied to the transform position and vice-versa.

当为false时:模拟位置将不会被应用到变换位置,反之亦然。

Setting updatePosition to false can be used to enable explicit control of the transform position via script. This allows you to use the agent's simulated position to drive another component, which in turn sets the transform position (eg. animation with root motion or physics).

设置updatePosition 为false可以用于由脚本启用,明确控制变换位置。该属性允许你去使用代理的模拟位置去驱使其他组件,那些转弯时设置变换位置的(即,动画的根运动或者物理系统)。

When enabling the updatePosition (from previously being disabled), the transform will be moved to the simulated position. This way the agent stays constrained to the navmesh surface.

当启用updatePosition(先前被禁用的),该变换将会被移动到模拟位置。这种方式保持约束代理在navmesh 表面。

navmeshagent

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文