How do I spawn objects within a radius?

Get help using Construct 2

Post » Tue Mar 03, 2015 2:03 pm

I want to spawn objects randomly but still within a circle radius?

How to do that?
B
10
S
5
Posts: 220
Reputation: 1,464

Post » Tue Mar 03, 2015 2:31 pm

Spawn point - (x,y)
where:
x = CenterX + RADIUS * cos(YourAngle)
y = CenterY + RADIUS * sin(YourAngle)

CenterX, CenterY - center of your circle
RADIUS - circle radius
YourAngle - angle you want from 0 to 359
B
8
Posts: 72
Reputation: 456

Post » Tue Mar 03, 2015 2:39 pm

Got it. Thank you.
B
10
S
5
Posts: 220
Reputation: 1,464


Return to How do I....?

Who is online

Users browsing this forum: Husui, MonDieu, Ratmaster and 1 guest