When using the Fisica library, in particular via SVGs from Geomerative, I've been having two problems I have not been able to surmount.
The first that shapes often stick together when in a world. The Fisica library (or the JBox2D library under it) provides mechanisms to keep shapes from overlapping, but sometimes it fails, and shapes will not separate. This is readily apparent when using the Fisica WingedStar example.
I've tried a lot of kluges, but have not managed to reliably convince the engine to separate shapes once they have joined together.
The other problem with the Fisica/Geomerative combination is that imported SVGs routinely produce these errors:
Yep, this is known. It is a bit tricky, I don't know the details well, but it seems to happen when the vertices of the polygons are close together or the polygons are complicated (with sharp angles between consecutive edges). One half-solution I have found is playing around with the scale parameter of the Fisica library. This allows to modify the ratio pixels/meters of the physical simulation.
To change this just call:
after the Fisica.init(this); line. Try with different scales.
I haven't been able to significantly reduce the stickiness via setScale(), but I'll keep messing around with it. I tried remaking some of my shapes with fewer/smoother vertices, but that didn't help either.
Any idea re: the dropped SVG shape errors?
Leave a comment on niteshade's reply
Change topic type
Link this topic
Provide the permalink of a topic that is related to this topic