GameObject.constantForce 恒力

var constantForce : ConstantForce

Description描述

The ConstantForce attached to this GameObject (Read Only). (null if there is none attached)
附属于这个游戏物体上的恒定的力(只读)。(如果没有则为空)

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	public GameObject other;
	public void Awake() {
		other.constantForce.relativeForce = new Vector3(0, 0, 1);
	}
}
var other : GameObject;
other.constantForce.relativeForce = Vector3(0, 0, 1);
Page last updated: 2010-12-13