Version: 2022.2

Rigidbody.inertiaTensorRotation

切换到手册
public Quaternion inertiaTensorRotation ;

描述

惯性张量的旋转。

如果未在脚本中设置惯性张量旋转,则根据附加到刚体的所有碰撞体自动计算。

// Resets the inertia tensor to be the coordinate system of the transform

using UnityEngine; using System.Collections;

public class ExampleClass : MonoBehaviour { void ResetTensor() { GetComponent<Rigidbody>().inertiaTensorRotation = Quaternion.identity; } }