Hello everyone!
I was looking for some solution about my idea, I want to crate an abject in the blue zone but not in the red one:
So I have read this very interesting post but didn't get something about the code, so maybe someone can give me some explanation. Or maybe I'm all wrong.
I used this code to spawn my object:
x = (cos(random(0,1)) * radius) + position
y = (sin(random(0,1)) * radius) + position
So I did presume that the (0,1) is supposed to be the start position and the en position. so for my zone, that's probably (118,256)
My circle is 256 so the radius is 128. Then my code should look like this:
x = (cos(random(118,256)) * 128) + position
y = (sin(random(118,256)) * 128) + position
Unfortunately, it doesn't seem to be correct. Seems that I didn't get how it work so I would appreciate some explanation!
Thanks