mirror of
https://github.com/lubosz/overte.git
synced 2025-04-09 07:22:31 +02:00
Fix walk.js script
This commit is contained in:
parent
309b381bab
commit
a6da91ee35
2 changed files with 6 additions and 6 deletions
|
@ -82,7 +82,7 @@ Avatar = function() {
|
|||
|
||||
// only need to zero right leg IK chain and hips
|
||||
if (IKChain === "RightLeg" || joint === "Hips" ) {
|
||||
MyAvatar.setJointData(joint, Quat.fromPitchYawRollDegrees(0, 0, 0));
|
||||
MyAvatar.setJointRotation(MyAvatar.jointNames.indexOf(joint), Quat.fromPitchYawRollDegrees(0, 0, 0));
|
||||
}
|
||||
}
|
||||
this.calibration.hipsToFeet = MyAvatar.getJointPosition("Hips").y - MyAvatar.getJointPosition("RightToeBase").y;
|
||||
|
@ -112,16 +112,16 @@ Avatar = function() {
|
|||
this.poseFingers = function() {
|
||||
for (knuckle in walkAssets.animationReference.leftHand) {
|
||||
if (walkAssets.animationReference.leftHand[knuckle].IKChain === "LeftHandThumb") {
|
||||
MyAvatar.setJointData(knuckle, Quat.fromPitchYawRollDegrees(0, 0, -4));
|
||||
MyAvatar.setJointRotation(MyAvatar.jointNames.indexOf(knuckle), Quat.fromPitchYawRollDegrees(0, 0, -4));
|
||||
} else {
|
||||
MyAvatar.setJointData(knuckle, Quat.fromPitchYawRollDegrees(16, 0, 5));
|
||||
MyAvatar.setJointRotation(MyAvatar.jointNames.indexOf(knuckle), Quat.fromPitchYawRollDegrees(16, 0, 5));
|
||||
}
|
||||
}
|
||||
for (knuckle in walkAssets.animationReference.rightHand) {
|
||||
if (walkAssets.animationReference.rightHand[knuckle].IKChain === "RightHandThumb") {
|
||||
MyAvatar.setJointData(knuckle, Quat.fromPitchYawRollDegrees(0, 0, 4));
|
||||
MyAvatar.setJointRotation(MyAvatar.jointNames.indexOf(knuckle), Quat.fromPitchYawRollDegrees(0, 0, 4));
|
||||
} else {
|
||||
MyAvatar.setJointData(knuckle, Quat.fromPitchYawRollDegrees(16, 0, -5));
|
||||
MyAvatar.setJointRotation(MyAvatar.jointNames.indexOf(knuckle), Quat.fromPitchYawRollDegrees(16, 0, -5));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -449,6 +449,6 @@ function renderMotion() {
|
|||
}
|
||||
|
||||
// apply rotations
|
||||
MyAvatar.setJointData(jointName, Quat.fromVec3Degrees(jointRotations));
|
||||
MyAvatar.setJointRotation(MyAvatar.jointNames.indexOf(jointName), Quat.fromVec3Degrees(jointRotations));
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue