Cloth.selfCollision 自身碰撞


var selfCollision : bool

Description描述

Will the cloth collide with itself?

是否产生自身碰撞。

Enable this only where needed, as it has a big   impact on cloth performance.

在需要时才开启它,这将很大程度上影响布料的性能。

  • C#

  • JavaScript

using UnityEngine;using System.Collections;public class example : MonoBehaviour {public void Awake() {GetComponent<InteractiveCloth>().selfCollision = false;}}
GetComponent(InteractiveCloth).selfCollision = false; 


,