rotationUniform
Returns a random rotation with uniform distribution (Read Only).
읽는 시간 1분최근 업데이트: 한 달 전
Definition
- Type: Property
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
public static Quaternion rotationUniform { get; }
Remarks
Employs Hopf fibration to return a random Quaternion within a uniformly distributed selection space. Gives higher quality results compared to the more naive approach employed by Random.rotation, though at a 40% performance cost.
Examples
using UnityEngine;public class Example : MonoBehaviour{ void Start() { // Sets a random orientation for the object. transform.rotation = Random.rotationUniform; }}