Description
The Rotation.Random
property provides a static method to obtain a uniformly random rotation. This is useful in scenarios where you need to apply a random orientation to an object, such as in procedural generation or randomizing object orientations in a scene.
Usage
To use the Rotation.Random
property, simply access it directly since it is a static property. It does not require any parameters and returns a Rotation
object representing a random orientation.
Example
// Example of using Rotation.Random to apply a random rotation to a GameObject
GameObject myObject = new GameObject();
myObject.Rotation = Rotation.Random;