I am trying to get a random float between -1 (inclusive) and 1 (inclusive).
I have tried Random.Range(-1, 1), but this just provides -0.1 or 0.
I have tried Random.Range(-1.0F, 1.0F), but this just provides between -0.1 and 0.1
Two questions:
Why are these the results?
How can I get a random float between -1 and 1?
Details:
I am just calling the Random methods in my update method and printing them out like such:
void Update(){
float randomNumber = Random.Range(#, #) * 1;
Debug.log(randomNumber);
}
Update:
It is not happening unless I multiply by 1…what???