Random coordinates around a positions
#2

Get the centre of the circle and then use 2 randoms to add to the X and Y, i.e.

PHP код:

new Float:CentreCircle[3];

CentreCircle[0] = 0;
CentreCircle[1] = 0;
CentreCircle[2] = 0;

new 
randX random(/*Max*/ /*Min*/)+/*Min*/,
       
randY random(/*Max*/ /*Min*/)+/*Min*/;

printf("Random Position: X: %f, Y: %f, Z: %f"CentreCircle[0]+randXCentreCircle[1]+randYCentreCircle[2]); 
Not tested but pretty sure this something like this work.
Reply


Messages In This Thread
Random coordinates around a positions - by m4karow - 11.08.2018, 19:50
Re: Random coordinates around a positions - by ItsRobinson - 11.08.2018, 20:29
Re: Random coordinates around a positions - by Freaksken - 11.08.2018, 22:00
Re: Random coordinates around a positions - by ItsRobinson - 11.08.2018, 22:01
Re: Random coordinates around a positions - by Freaksken - 11.08.2018, 22:07
Re: Random coordinates around a positions - by m4karow - 12.08.2018, 08:36
Re: Random coordinates around a positions - by m4karow - 18.08.2018, 13:27
Re: Random coordinates around a positions - by Shinja - 18.08.2018, 15:17
Re: Random coordinates around a positions - by m4karow - 18.08.2018, 15:23
Re: Random coordinates around a positions - by Freaksken - 18.08.2018, 15:43

Forum Jump:


Users browsing this thread: 2 Guest(s)