If there is some kind of library or tool you often use in other game development tools where a Defold version doesn’t yet exist please post here.
Personally I use PhysicsEditor for making vertexs of complex physics objects.
STL…
…
sorry, running a fever here…
The Defold polygon editor should help with this: https://www.defold.com/community/projects/58981/
BTW Can the Physics Editor export to a custom format? Ie can we write an exporter to our .shape files?
Defold polygon editor not allow to create polygon with internal angles.
imagine that I need to add the complex physics object like hydrocycle:
the first, in Physic Editor I do vertices:
then save in format for PhaserJS, look like:
"boat6": [
{
"shape": [ 108,44, 45,98, 8,66, 28,51, 107,3, 128,18 ]
},
{
"shape": [ 206,107, 189,69, 211,52, 228,52, 243,74 ]
},
{
"shape": [ 137,69, 45,98, 108,44 ]
},
{
"shape": [ 137,69, 189,69, 206,107, 45,98 ]
}
]
second, I wrote the script to convert this data to needed format:
(need a flip Y coordinates top down)
shape_type: TYPE_HULL
data: 108
data: 63
data: 0.0
data: 128
data: 89
data: 0.0
data: 107
data: 104
data: 0.0
data: 28
data: 56
data: 0.0
data: 8
data: 41
data: 0.0
data: 45
data: 9
data: 0.0
(the first polygon, for example)
and save it as part1.convexshape and add it as collision shape.
Ah, I see. Well, you should be able to create your own exporter (https://www.codeandweb.com/physicseditor/tutorials/customize_physicseditor_exporter) so you don’t have to do a manual extra step.
oops really! didn’t know about this, thanks!
@BunBunBun How are you dealing with multiple-polygon objects in Defold? Just using many collision components on the same object?
In hindsight, I probably should have spent my time making one of these exporters instead of building my own polygon editor . . . ([Edit:] Oh, nevermind, it’s not free, hmm . . . )
Since it’s commercial software you could contact the maintainer and ask them to add official support too.
You could add automatic concave mesh support for generating multiple convex collision shapes. Also could do binary releases on github so people don’t have to build to use.
Yes. I have had a fairly long to-do list for the polygon editor for a while now, including this feature. It’s just never been a high priority. I’ve been trying to spend my time actually making games lately, hah!
@Pkeod yes, I thought about it, but it was faster to write own script, don’t like waiting okay, I will contact him.