Returns a random rotation with uniform distribution (Read Only).
// Sets a random orientation for the object. transform.rotation = Random.rotationUniform;
using UnityEngine; using System.Collections;
public class ExampleClass : MonoBehaviour { void Example() { transform.rotation = Random.rotationUniform; } }
Did you find this page useful? Please give it a rating: