Drag 'n' Drop MovieClips / Box2D Bodies How To (*UPDATED*)

Oh mayo, that is amazing, I can't thank you enough. I've played around with the demo .fla and I can hardly contain my excitement.

I've been working on my first Box2D game and it's quite a chore, which is fair enough as physics isn't meant to be easy, but your tool will boost my productivity 100 fold. I developed my own tool over the last couple of days that speeds development up considerably but your tool knocks my socks off. Thank you so much for sharing.

I'm getting five warnings when compiling your demo, but, as you say it's a work in progress so it's to be expected. Never the less, the demo is working fine.

FYI:

Cursor.as line 67: "Warning: 3596: Duplicate variable definition." (no biggy)
World.as, lines 78, 81, 84 and 88: "Warning: 1100: Assignment within conditional. Did you mean == instead of =?"

Once again, thanks mayo - your work combined with verso's tool is really opening up Box2D to the masses. 😁

I'm so happy that I switched from Ape to Box2D. I'll will include you in my game credits along with Erin.
Thanks for the praise pault107.

Let me know if you've got any questions, find any of the code awkward, or think of new features that would be handy. I want to make this as easy to use as possible (since I'm using it myself).

One ambitious idea I've been considering recently is to integrate timeline keyframing / tweening into Box2d, so that it would be possible to create animations on the timeline that influence the physics simulation. For example, say you create a dancing rag doll in Flash using key frames, feed that into Box2d, then let the rag doll follow that animation as long as the physics simulation allows it. So if you chuck a big box at the rag doll or smash it into a wall, the animation will break and the rag doll will respond to the collisions appropriately, but eventually it'll recover and start dancing again. I'm finding it tedious to animate "creatures" in my world and it would be much easier to do this using Flash's built in animation features.
The praise is more than warranted Mayo.

I've just managed to integrate your kit into my bare-bones game and my level creation speed is going through the roof.

I'm getting a few runtime errors when attempting to use some joint types, but I'm guessing that is due to my lack of joint knowledge.

Once again Mayo, I can't thank you enough.
pault107 wrote:
I'm getting a few run time errors when attempting to use some joint types, but I'm guessing that due to my lack of joint knowledge.

... or misuse of the component properties (didn't document them too well), or a genuine bug. What errors are you getting?
hi there, awesome work mayo, i´m new to box2d so could you please post a little more detailed guide for adding new movieclips to a View or World, i'd REALLY appreciate it.
hi there, awesome work mayo, i'm new to box2d so could you please post a more detailed guide for adding movieclips to a View or World, i'd REALLY appreciate it.
i've managed to make a new world and adding new movieclips to it but every time i run it everything falls, the objects have all the physic properties but i can't figure out how to make the world to stay where i put it, also can someone explain to me how to add functional joints?
Hey, thanks sunday_morning for posting the question; you've bumped this great component onto the front page 🙂. And of course, thanks Mayo for the addition!

It's a little dissapointing to see that this has been available since Decemeber and there's no documentation anywhere. I've just found it today and after some time, I may be able to decypher how it works and how to implement it, but if there are any users out there, some basic doumention, or even just some direction, would be a great help.

If everything is defined in the authoring environment (properties panel?), how do you change things like the graivity vector (and radial on/off), as well as setting body.m_userData properties and static vs dynamic body creation?
lakehaze wrote:
It's a little dissapointing to see that this has been available since Decemeber and there's no documentation anywhere.


How do people feel about putting up information on Box2D addons and aids such as this on the wiki?
BorisTheBrave wrote:
lakehaze wrote:
It's a little dissapointing to see that this has been available since Decemeber and there's no documentation anywhere.


How do people feel about putting up information on Box2D addons and aids such as this on the wiki?


I think that's a great idea.

Original thread: https://box2d.org/forum/viewtopic.php?t=367