How I can create circle object?

is editor support circle object? Or only ellipse?

Isn’t a circle just a specific ellipse? :slight_smile: Just make sure height and width are the same and you have a circle :wink:

Regards,
Ablu

Yes, ofcouse.
I use Tile to create game on libgdx. Libgdx can parse and load tmx-maps. I find, that libgdx support not only EllipseMapObject, but also CircleMapObject. Then suggested, that Tile also different ellipse and circle…
For me, as developer, there is no difference between this objects, because I can parse each object and extract x,y.

I’m not sure if the CircleMapObject is actually used by libgdx when loading a map. I could imagine it is only a libgdx-specific extension feature that could be used in your own code and may be a little more convenient in some cases.

Tiled has no separate notion of circle objects, since as Ablu pointed out you can just make an ellipse where width and height are equal. I do think it would make sense to support locking of the aspect ratio while resizing, to make it easier to keep a circle a circle. This is currently not possible so generally you’d have to use the Properties view to make sure the width and height are equal.

Understood. No problem. It was only a matter of curiosity.

Yes but in LibGDX how does one then create a Box2d body from an ellipse? There is a CircleShape but not an EllipseShape with which to seed createFixture(shape,0);

Since Box2D does not support ellipse objects, you’ll have to triangulate it (creating a polygon shape that roughly matches the shape of the ellipse).