- Home /
Physics 2D ragdoll
Hello! In native Unity you can create ragdoll from 3d model with bones. But what to do if i want to create skeleton animation from sprites? it could be corpse or rope or anything else. Are there any tutorials about this?
Answer by nishant619 · Sep 05, 2015 at 01:11 AM
Sorry if i am 2 years too late. but i did something like the previous answer and it worked. the following steps are for making a skeleton with only 6 body parts. those are 1x head, 1 x torso, 2 x arms, 2 x legs. but if u do this u will understand the process and can make joints even further complex. follow the steps as it is, and i take it that you have put all the body parts in the scene and rigged them on their desired position.
attach rigidbody2d to all the the parts u want in ur skeleton.
attach boxCollider or any other collider u want, to all the parts.
having selected all the body parts excluding torso, attach hinge joints.
having selected all the body parts excluding torso, drag and drop torso in the inspector where it asks for connected rigidbody.
now go to the individual body parts excluding torso and adjust the ring and the dot. you have to put the ring and the dot in the same position u want the joint.
note: moving the ring gets difficult with the current interface but it lies on the pivot, so if u adjust the pivot before hands you wont have any problem.
I found a video tutorial cuz it was kind of confusing at first for me.. so for those who are more comfortable with video tuts.. here you go Click here
Answer by faraza158 · May 20, 2020 at 07:10 PM
I found a quick video tutorial on how to make 2d ragdolls with joints and stuff.. Here you go Click here
Answer by sattri99 · Dec 31, 2013 at 03:04 PM
Yes, You can make a ragdoll in unity 2d but not through bones or skeleton. You can achive the similar effect by manually parenting and then attaching joints and rigidbodies to them. for eg. If you want to make a character a ragdoll, first you will have to make different sprites for hands, legs, torso and head (fingers optional) and then import them in unity seperately, position them in their place and add rigidbody2d component to all the sprites. then parent the hand, legs and head to the torso and add hinge joint component to each thing. second example : if you want to make a rope you will have to make many rectangle rigidbodies and position them on the top of other untill the satisfactory length is achieved and then parent them one by one. And add hinge joints to them to make arope like physics
but every hinge joint attaches to a pivot point, that could be only one in object. So if i create body sprite with pivot on top, i can snap a head to it, but if i want to attach legs to the body, they will spown on the top pivot. Whats wrong? (sry for eng)
Answer by gpaulguilfoyle · Jan 12, 2020 at 10:58 AM
Here is a full tutorial on using hinge joints to create a unity 2d ragdoll If anyone is interested in building out a character.