Hello, so i am generating a random angle at which i want to instantiate an object, and I want to exclude a certain range of degrees. The code looks like this:
void Spawn()
{
angle = Random.Range(0f, 360f) * Mathf.Deg2Rad;
if(angle < maxAngle && angle > minAngle)
{
//Instantiate
}
How can I make it reroll the angle if the condition in if statement is not met and then check again?