Hiya guys. I am tring to create a human body with fully controllable joints. In the end it probably would look something like this: QWOP (I am also working in 2d)
I am using configurable joint with these settings:
The script to control the movement is this:
So THE PROBLEM is basically this - it doesn`t work the way I want to. The value of "targetAngle" can go higher or lower than the angle the leg can bend, and that causes the legs to jump around (if I hold down long enough for targetAngle go from +70 to -70 the wrong way) or a lag between movements (when targetAngle crosses the 70* line, and I have to wait for it to move back).
I am pretty new both to Unity and programming, and can
asked Jan 02 '12 at 03:02 PM
Fixed it with this line targetAngle = Mathf.Clamp( targetAngle, -70, 70);
answered Jan 04 '12 at 09:28 AM