Legacy Documentation: Version 5.0
Language: English
  • C#
  • JS

Script language

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

Cloth.useGravity

Switch to Manual
public var useGravity: bool;

Description

Should gravity affect the cloth simulation?

#pragma strict
// Dont use gravity on this cloth regardless if is Interactive or Skinned.
transform.GetComponent.<Cloth>().useGravity = false;