Legacy Documentation: Version 4.6(go to latest)
Language: English
  • C#
  • JS
  • Boo

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

InteractiveCloth.density

Switch to Manual
public var density: float;

Description

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.

	// This will simulate heavy cloth like "chain mail"

transform.GetComponent(InteractiveCloth).density = 50;