Quote:
Originally Posted by Laur07
Hey, for my project i need to make my person move in a random direction, I know how to make it move a random distance but I am struggling with the direction, does anyone know how to do this ?
Thank you !
|
This probably isn't the best way, but it should work, and was the first idea that came to mind. What don't you have Alice select a random number, and then have an if/else method that basically says that if the random number equals this then have the person turn this direction, otherwise, have him turn this direction. You could also put an if/else loop within an if/else loop to make the randomization even more random. I hope this helps!