Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

unity random point in sphere

void Start()
    {
        // Sets the position to be somewhere inside a sphere
        // with radius 5 and the center at zero.

        transform.position = Random.insideUnitSphere * 5;
    }
 
PREVIOUS NEXT
Tagged: #unity #random #point #sphere
ADD COMMENT
Topic
Name
1+4 =