返回介绍

Cloth.ClearTransformMotion 清除变换运动

发布于 2019-12-18 15:37:31 字数 1534 浏览 1111 评论 0 收藏 0

JavaScript => public function ClearTransformMotion(): void;
C# => public void ClearTransformMotion();

Description 描述

Clear the pending transform changes from affecting the cloth simulation.

从影响布料模拟改变中清除未定的变换。

When the transform of a cloth changes, the cloth will not directly follow that change, but instead, the new positions of the SkinnedMeshRenderer's vertices will affect the cloth through the configured constraints in the next cloth simulation update, so that moving the tranform will result in realistic motion of the cloth.

当布料的变换改变时,该布料不会立即跟随改变,恰恰相反,SkinnedMeshRenderer的顶点的新的位置将会通过配置约束下次更新布料模拟影响布料,因此移除改变换将会使布料运动更加逼真。

You can call ClearTransformMotion on the cloth to change this behavior. Calling ClearTransformMotion will move the cloth simulation particles along with the transform, so that the transform movement has no effect on the cloth simulation. This is useful if you want to teleport Characters from one point in the scene to another, without having the cloth suddenly jerk into place.

在布料发生改变时,你可以调用ClearTransformMotion。调用ClearTransformMotion 时,将会沿着变换移除布料模拟粒子,因此该变换对布料模拟没有影响。如果你想将角色从一点传送到另一点时这是有用的,布料不会突然猛地到达位置。

JavaScript:

no example available in JavaScript

C#:

transform.position = newPosition;
GetComponent<Cloth>().ClearTransformMotion();

cloth

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

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

发布评论

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