Page 1 of 1

Export fixture outline coordinates

Posted: Mon Feb 08, 2016 8:52 pm
by totebo
I export level scenes to JSON then load them in my game. Is there a way to include just the outline of a complex fixture, instead of vertices of each individual polygon?

In my game I've tried removing duplicate vertices of a fixture, then arranging them ccw. But it's not easy! I was hoping there was a more straightforward way of doing this, since in the editor you manipulate each fixture as a "whole".

Re: Export fixture outline coordinates

Posted: Tue Feb 09, 2016 10:19 pm
by iforce2d
What kind of fixture are we talking about here? Fixtures should not have any duplicate vertices in them.

If you mean 'fat' fixtures like a line with a non-zero radius, there is no method to export that outline.

If you mean to merge multiple fixtures into a single outline by adding vertices at their intersections, you may be interested in this thread: viewtopic.php?f=9&t=474