文档

Unity Engine

Unity Engine

sleepAngularVelocity

The default angular velocity, below which objects start sleeping (default 0.14). Must be positive.
阅读时间1 分钟最后更新于 1 个月前

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.PhysicsModule
警告
Removed. The sleepAngularVelocity is no longer supported. Use sleepThreshold. Note that sleepThreshold is energy but not velocity.
public static float sleepAngularVelocity { get; set; }

Remarks

See the Physics Overview in the manual for more information about Rigidbody sleeping. This can be overridden per rigidbody using Rigidbody.sleepAngularVelocity.
This value is usually changed in
Edit->Project Settings->Physics
inspector instead of from scripts.

Examples

using UnityEngine;public class Example : MonoBehaviour{ void Start() { Physics.sleepAngularVelocity = 0.1f; }}