mirroring a Movie.Clip which contains wck.BodyShapes

hello everybody!

After a few days of breaking my brain with the documentation of Box2D , WCK examples and Flash CS5 itself ( cause i never programmed action script before ) i managed to do this:

http://www.drkucho.com/mister.html

The guy is a Movie.Clip Symbol that inside has all the body parts and joints...you can walk with the arrows , as you can see it walks forward and backwards , all good so far. The thing is: next step is making the guy to flip and head left when i press a key, and then, of course, be able to walk facing to the left same way it does now to the right...

any easy way to do this? , not sure if its possible to flip the movie clip, and this will flip all Box2D object properties, like limits of the joints for example ... i have made a test in flash , by flipping the guy symbol with the free transform tool , but the joints wont flip , in other words, the guy will have elbow sand knees reversed 😕
That looks superb! At first it looks like a rag doll, but it turns out to be more like a marionette. I would love to know how you've pulled that off.

I'm not aware that there is any built-in method for flipping a complete hierarchy of physics shapes and joints. That would definitely be nice. The usual answer to problems like this is to destroy all the physics and rebuild... but I think all you need to destroy and rebuild are the joints. So your ankle joints when recreated could be made to spring the foot and leg into their correct positions. That could make for a nice smooth transition, as opposed to instantly mirroring the character.
That is an impressive ragdoll!

I can't really think of anyway to smoothly flip everything. You're basically going to have to recreate everything using a different symbol / keyframes / etc. which will result in jerky transitions. I kinda like the backwards walking anyway. 😀
thanks for the kind words and tips, even saying "its not possible" helps a lot so i stop looking for that and think on alternatives.

i actually did already these days lol, finally made the flipping by defining new angle limits for the elbow , ankle , and knees , by doing so they automatically flip themselves, it look not bad , the only weird thing are the feet that they rotate up over the floor line , but i can accept that i guess

anyway i dont know much about creating and destroying bodies on code, as i use wck for that.

i made some improvements, now you can flip the guy by pressing down arrow , and jump with "up", but jump is so stupid for now.

http://rapidshare.com/files/441889086/ESPARRAGOS4.swf

also rewrote the walking code to be able to change speed ( so do the length of each step ) proportionally of the ramp he is climbing, i calculated that based on the coordinates of both feet , you cant tell much on the test hill i did but it works , not as good as i would like (still stumbles sometimes ) but will improve that later.

also the walking on flat floor is not very nice now, it feels a little jumpy... 🙄

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