ConstantForce.force 力
var force : Vector3
Description描述
The force applied to the rigidbody every frame.
每帧应用力给刚体。
C#
JavaScript
using UnityEngine;using System.Collections;public class example : MonoBehaviour {public void Awake() {constantForce.force = Vector3.up * 10;}}
// Moves the rigidbody upwards in world coordinates//在世界坐标向上移动刚体constantForce.force = Vector3.up * 10;