Rigidbody が重力の影響を受けるかどうか
これを false に設定すると、リジッドボディは無重力空間にいるかのように振る舞います。
var coll: Collider;
function Start() { coll = GetComponent.<Collider>(); coll.isTrigger = true; }
// Disables gravity on all rigidbodies entering this collider. function OnTriggerEnter(other: Collider) { if (other.attachedRigidbody) { other.attachedRigidbody.useGravity = false; } }
using UnityEngine; using System.Collections;
public class ExampleClass : MonoBehaviour { public Collider coll; void Start() { coll = GetComponent<Collider>(); coll.isTrigger = true; } void OnTriggerEnter(Collider other) { if (other.attachedRigidbody) other.attachedRigidbody.useGravity = false; } }