Version: 2022.2
  • C#


Suggest a change


Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.


Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.



Switch to Manual
public static Quaternion rotationUniform;


Returns a random rotation with uniform distribution (Read Only).

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 rotation, though at a 40% performance cost.

using UnityEngine;

public class Example : MonoBehaviour { void Start() { // Sets a random orientation for the object. transform.rotation = Random.rotationUniform; } }