Cloth.ClearTransformMotion

Switch to Manual
public void ClearTransformMotion ();

Description

使待处理的变换组件更改不影响布料模拟。

当布料的变换组件改变时,布料不会直接随之发生该变化,而是在下一次布料模拟更新时,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.

using UnityEngine;

public class ExampleClass : MonoBehaviour { Vector3 newPosition;

void Start() { transform.position = newPosition; GetComponent<Cloth>().ClearTransformMotion(); } }