Vector3 Random { get; set; }

robot_2Generated
code_blocksInput

Description

The Vector3.Random property provides a randomly generated 3D vector. This vector is uniformly sampled from all points within a unit sphere centered at the origin, meaning that the distance from the origin to the point is at most 1. This can be useful for generating random directions or positions within a bounded space.

Usage

To use the Vector3.Random property, simply access it directly as it is a static property. It does not require any parameters and will return a new Vector3 instance each time it is accessed.

Example

// Example of using Vector3.Random
Vector3 randomVector = Vector3.Random;

// Output the random vector
// Note: Avoid using Console.WriteLine in s&box, use logging or debugging tools instead
Log.Info($"Random Vector: {randomVector}");