I am making a game in which there are 2 circle at fix position. One is bigger, second is smaller and inside the bigger one. I need to spawn a object randomly between this 2 circle.
Can anyone help me.
Thanks you.
Repeat 100 times
...Create object at X=500+100*cos(random(360)) , Y=500+100*sin(random(360))
Where (500,500) is the center, 100 is the circle radius, random(360) is random angle.
Develop games in your browser. Powerful, performant & highly capable.
Thank you dop2000 but this is not working for me. I have try and test what you have say but sometimes the object is spawning inside the circle, but thank you.
Do you have any other suggestions then please tell me.
It should work. Please share your event sheet or capx file.
dop2000 don't worry. It's is working fine. Thank you for your help.