I'm trying to make a Ragdoll that can move each limb individually. However when I try testing this on the Ragdoll's right leg, I get this error.
error CS1061:'CharacterJoint' does not contain a definition for 'AddForce' and no accessible extension method 'AddForce' accepting a first argument of type 'CharacterJoint' could be found (are you missing a using directive or an assembly reference?)
I tried switching AddForce with SwingAxis which didn't change anything. I looked up the methods for Character Joint but couldn't find any that would make the leg bend at the joint.
public class rightLeg_movement : MonoBehaviour
{
public CharacterJoint cj;
public float forwardForce = 2000f;
void FixedUpdate()
{
if( Input.GetKey("m") )
{
cj.AddForce(forwardForce, 0, 0);
}
}
}
All of the tutorials I looked up use an animation instead. However I plan on implementing an ai to do basic tasks with the Ragdoll(like learning to picking itself up, or learning to walk).