Created
April 29, 2015 18:28
-
-
Save hawksprite/5055e574183299a4319d to your computer and use it in GitHub Desktop.
New Location
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vector3 newLocation(){ | |
newLocation = new Vector3(Random.Range(-40,40),Random.Range(-40,40),Random.Range(-40,40)); | |
while(Vector3.Distance(playerLocation, newLocation) < 20){ | |
newLocation = new Vector3(Random.Range(-40,40),Random.Range(-40,40),Random.Range(-40,40)); | |
} | |
return newLocation; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment