ConstantForce.torque 力矩


var torque : Vector3

Description描述

The torque applied to the rigidbody every frame.

每帧应用给刚体的力矩。

  • C#

  • JavaScript

using UnityEngine;using System.Collections;public class example : MonoBehaviour {public void Awake() {constantForce.torque = Vector3.up * 2;}}
// Rotates the object around the world y-axis//绕世界y轴,旋转物体constantForce.torque = Vector3.up * 2;


,