6 Replies Latest reply on Nov 29, 2006 11:20 AM by kglad

    Rag Doll Physics

      I need some help in making a rag doll in flash.
      What is the best method and how do i do it.


        • 1. Re: Rag Doll Physics
          Bob_Robertson Level 1
          This requires the creation of a physics system, which would in turn include the calculated effects of such things as mass, velocity, and some kind of drag factor. I recommend that you bone up on your basic physics, search for examples that already use ragdolls (newgrounds is a good place to start; also check out addictinggames, as I think they have a sample where you pull a rag doll lady through some bubbles), and examine their code using Flash Decompiler. The free version is crippled so that you can't rip .fla files directly, but being able to look at the code should help a lot.
          • 3. Re: Rag Doll Physics
            Jophish Level 1
            I followed the advice given by Bob, and i have decided that the best method would be to use springs to join the points on the body. the problem that i have encountered is that when i try to drag one part of the spring the others like to stay where thay are. could IK solve this. EG join the other joints that are not being dragged with IK.

            the problem with this is that i cant find a way to affect IK joints with forces such as momentun amd gravity. i could do without springs if i could apply these forces to them.

            oh and i cant seem to get the balance of friction and spring force right what would be the optimum values.

            hereis the code for a head, shoulders and elbows.
            • 4. Re: Rag Doll Physics
              kglad Adobe Community Professional & MVP
              you're reinventing the wheel (or engine). check flade which has been superceded by ape (actionscript physics engine):

              • 5. Re: Rag Doll Physics
                Jophish Level 1
                thanks for the help.
                1. are there any good tutorials on flade.
                2. how would i get AS3 on my PC (for APE).
                3. is flex any similar to flash.


                • 6. Re: Rag Doll Physics
                  kglad Adobe Community Professional & MVP
                  1. open index.html in ape/docs/api for the existing documentation for ape

                  2. you can download flash 9 alpha from adobe free of charge.

                  3. http://thewpfblog.com/?p=54