Version: 2017.1
public void ClearTransformMotion ();

説明

布のシミュレーションに影響を及ぼすことから Pending 状態の Transform の変更をクリアします。

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.

この動きを変更するには布オブジェクト上で ClearTransformMotion を呼び出す必要があります。ClearTransformMotion を呼び出すことで Transform と一緒にシミュレーションの粒子を移動させることになります。つまり、Transform の動きが布シミュレーションの影響を受けないということです。これは、キャラクターをシーン内の別の位置へとワープさせたいときに便利です。これにより、布が(キャラクターについていかないような感じで)不意にガクッと移動してしまうことはありません。

using UnityEngine;

public class ExampleClass : MonoBehaviour { Vector3 newPosition;

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