[SOLVED] Radial Tiled Clones

Hello,
I would like to generate objects from code around a single point and inclined according to their position.
For example, generate the yellow boxes :
image path833

My idea is to write a function that automatically generates a function with these parameters:
sprite,
number of objects,
center position
distance.
I honestly don’t know where to start.
Do you have any suggestions ?

Thanks,
J

That doesn’t seem too arduous. At a rough guess :

obejctNumber = 1 to NumberOfObject’

  • angle = objectNumber * (360/NumberOfObjects)
  • position = cos(ToRad(angle)) * distance + centrePosition,x, sin(ToRad(angle)) * distance + centrePosition.y
1 Like

Thanks,
I’ll try soon

Wow,
you are a genius:
editor


code

Preview
image

It is necessary to:
Draw the yellow box in horizontal
Move the origin Point of the box to the center

Thanks a lot,
J