Merge pull request #2317 from ey6es/master

Return the legs to the default position when we stop "crazylegs."
This commit is contained in:
Brad Hefta-Gaub 2014-03-14 17:25:56 -07:00
commit 6588002c8b

View file

@ -21,3 +21,10 @@ Script.update.connect(function(deltaTime) {
MyAvatar.setJointData("joint_L_knee", Quat.fromPitchYawRollDegrees(0.0, 0.0,
AMPLITUDE * (1.0 - Math.sin(cumulativeTime * FREQUENCY))));
});
Script.scriptEnding.connect(function() {
MyAvatar.clearJointData("joint_R_hip");
MyAvatar.clearJointData("joint_L_hip");
MyAvatar.clearJointData("joint_R_knee");
MyAvatar.clearJointData("joint_L_knee");
});