Description
The Rotation.Random
property provides a way to generate 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 as it is a static property. This will return a new Rotation
instance with 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;
// This will set the GameObject's rotation to a random value.