3
0
Fork 0
mirror of https://github.com/lubosz/overte.git synced 2025-04-26 17:35:44 +02:00

Return the legs to the default position when we stop the script.

This commit is contained in:
Andrzej Kapolka 2014-03-14 14:51:33 -07:00
parent 37ae5142a6
commit 608fa5869d

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");
});