Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
I heard somewhere that the unit has a site with documentation. It must have been stolen since you're asking this question. Luckily I still have the link: https://docs.unity3d.com/ScriptReference/Random-in...
using UnityEngine;
public class Example : MonoBehaviour
{
void Start()
{
// Sets the position to be somewhere inside a sphere
// with radius 5 and the center at zero.
transform.position = Random.insideUnitSphere * 5;
}
}
You take a spawn point, and along two axes you randomize within a certain limit. Roughly speaking, from -1 to 1 in x, y. z = z spawn points
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question