I'm trying to create a machine learning environment kind of like the ones you would see in Openai's Gym library for python.(https://gym.openai.com/envs/HumanoidStandup-v2/)
I'm still new to using unity's ragdoll and wanted to know how I can move each limb without using an animation. All of the tutorials and answers I find online are only for using an animation.
I was able to make the right and left legs rotate using this,
if (Input.GetKey ("up"))
{
transform.Rotate(0, 0, speed);
}
if (Input.GetKey("down"))
{
transform.Rotate(0, 0, -speed);
}
For the left leg I just replaced 'up' with 'w' and 'down' with 's'.
However, this only bends on the z axis. If I wanted the ragdoll to face somewhere else, the legs would bend the wrong way.
I'm also wanting to know if, for the ragdoll to stand up, would a downward force need to be applied on the thighs so that it would stay up?
↧