言語: 日本語
  • C#
  • JS
  • Boo

スクリプト言語

お好みのスクリプト言語を選択すると、サンプルコードがその言語で表示されます。

Rigidbody.useGravity

Switch to Manual
public var useGravity: bool;

Description

Rigidbodyが重力の影響を受けるかどうか

If set to false the rigidbody will behave as in outer space.

	// Disables gravity on all rigid bodies entering this collider.
	function OnTriggerEnter (other : Collider) {
		if (other.attachedRigidbody) {
			other.attachedRigidbody.useGravity = false;
		}
	}
	// Turn this collider into a trigger on startup
	collider.isTrigger = true;