InteractiveCloth.density 密度

var density : float


The density of the cloth.


This sets the mass of the cloth per area. Must be greater than zero. Changing this property causes the cloth simulation to reset.


using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	void Awake() {
		transform.GetComponent<InteractiveCloth>().density = 50;
// This will simulate heavy cloth like "chain mail"

transform.GetComponent(InteractiveCloth).density = 50;
Page last updated: 2011-3-27