Ok, so basically, my problem is this:
I have to create a complex physics body in Corona, via a “shape” property. So what do I have to do? I draw it in a graphical editor, then save it as PNG. Then I insert it in my program with the display.newImage line, then I add it in the physics engine with the physics.addBody command, after which I have to set it’s body coordinates in the “shape” property. For this, I need it’s xy coordinates *relative to the center of the rectangle my image is inscribed into*. How do I do this?
Currently, I insert my PNG in AutoCAD (my university degree is in building installations, so I’ve worked quite a lot with AutoCAD, and yes, I know, kudos to me for finding such use for a 4000$ software :D) and I draw my vectorial shape over it. Then I measure my coordinates, write them in a separate file and then copy-paste them in Corona. For a 20-somewhat sets of coordinates this takes me 30 to 60 minutes. Imagine doing that for a game level, 300-400 sets of coordinates, very probably more.
So the question I’m asking you is: is there any program, or any other method of getting those coordinates faster? I’m sure many of you have gone into this by now. How do you accomplish this task?
Thanks! [import]uid: 13720 topic_id: 5016 reply_id: 305016[/import]
welcome to code-only environments
[import]uid: 6645 topic_id: 5016 reply_id: 16463[/import]
maybe you could get some suitable output from Inkscape
http://www.youtube.com/watch?v=yvZM-YPPbII
[import]uid: 6645 topic_id: 5016 reply_id: 16464[/import]
sorry i thought you meant for laying out a whole level. if you just want to convert individual shapes into their relative physics shape definitons, you can use this thanks to Darren @ Ludicrous Software
http://developer.anscamobile.com/forum/2011/01/06/physics-shape-panel-adobe-fireworks
[import]uid: 6645 topic_id: 5016 reply_id: 16647[/import]
Wow… That is wicked. It’s a God-send. Thanks very much! [import]uid: 13720 topic_id: 5016 reply_id: 16890[/import]