- Home /
Configurable joints rotating at a certain angle
So I have a config joint on a knee for my character it only rotates on it's Y axis giving it that knee swing effect. I set it at 90 degrees and currently it bends forward and backwards past where your knee should bend. I want it to rotate from its starting position and then max out backwards at 90 degrees like a normal knee. Not rotate forward because if your knee rotates that direction you need a doctor. Any ideas? I can't find tutorials or info on it.
Answer by s_guy · Aug 30, 2013 at 05:02 AM
If you just need hinge behavior it will simplify things to use a hinge joint instead. For a hinge joint check "use limits" and then set Min and Max angles. Bump it with a collider, in the editor, at runtime for a quick and easy test of your angles.
For a configurable joint this will be an angular limit on the relevant axis.
I can't use a hinge joint. How do I do it with configurable joints?
Are you suggesting add a collide to stop the leg from rotating past a certain point? That sounds like a really bad / inefficient idea.
Colliders aren't needed. There are various built-in options for angular limits in a configurable controller. These limit how far something can rotate on a given axis, in either direction.
http://docs.unity3d.com/Documentation/ScriptReference/ConfigurableJoint.html
Answer by Kavorka · Feb 02, 2014 at 07:54 PM
You want to use a limit that has a low and a high limit i.e. the orange arrow should point to the knee´s left or right. Look at the video "How to make a decent ragdoll" on this channel: link
There I change the orange arrow direction for one of the elbows (start at 8 minutes if you are impatient).