Export fixture outline coordinates

General discussion about the R.U.B.E editor
Post Reply
Posts: 5
Joined: Sat Jul 19, 2014 9:14 am

Export fixture outline coordinates

Post 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".
Site Admin
Posts: 861
Joined: Sat Dec 22, 2012 7:20 pm

Re: Export fixture outline coordinates

Post 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
Post Reply