ConstantForce.relativeForce 相对力

var relativeForce : Vector3

Description描述

The force - relative to the rigid bodies coordinate system - applied every frame.

该力相对于刚体坐标系统,在每帧中应用。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	public void Awake() {
		constantForce.relativeForce = Vector3.forward * 10;
	}
}
// Moves the rigidbody forward
//向前移动刚体

constantForce.relativeForce = Vector3.forward * 10;
Page last updated: 2011-1-15