I have a sphere which I want to re-locate in the Start() function to a random Position which is between the Vector3(-3.75, 3.25, 2) and the Vector3(-1.25, 3.25, 0.75).
I have this code:
void Start () {
float xp = Random.Range (-3.75f,-1.25f);
float yp = 3.25f;
float zp = Random.Range (-2f, 0.75f);
gameObject.position = Vector3(xp, yp, zp);
}
Now this script doesn’t work.
How change this script?