Also, set each axis angular motion to Limited, this will be useful later. First, let’s lock the motion on all axis for every joint, since we want body parts only to rotate around each other, not to slide along. That’s okay, we still need to configure them. If you hit the play button now, you won’t see a difference between the body with and without joints. Generally, you’ll want the joint-less Game Object to be the root of your character, which is usually the hips or the torso. Of course, since one joint connects two body parts, you will have one less joint than body parts. For example, we should add a ConfigurableJoint to the forearm that connects it to the upper arm, and one to the upper arm that connects it to the chest/ribs. This is used to tell the joint to rotate towards a specific rotation, using the spring forces defined by its angular drives.įirst, we need to add a ConfigurableJoint component to each body part and set the connected body to its parent. But we use them primarily because of one function, the Target Rotation. Those are the more abstract type of joints, meaning that you can achieve the same behavior as any other joint with it. Joints are just physical entities that link two rigid bodies together, making them rotate and move around each other in a certain way.įor active ragdolls in Unity, we need to use Configurable Joints. After you’ve set up all of your rigid bodies, you need to connect them through joints.
0 Comments
Leave a Reply. |