Mirror on x instead of z

This commit is contained in:
Atlante45 2015-11-10 14:50:22 -08:00
parent ddf82c35e1
commit 3cbe1bc4da
2 changed files with 7 additions and 7 deletions

View file

@ -51,10 +51,10 @@
var batUserData = {
grabbableKey: {
spatialKey: {
relativePosition: {
x: 0.9, y: 0, z: 0
},
relativeRotation: Quat.fromPitchYawRollDegrees(0, 90, 0)
relativePosition: { x: 0.9, y: 0, z: 0 },
relativeRotation: Quat.fromPitchYawRollDegrees(0, 90, 0),
perHandRelativePosition: { x: 0.0808223, y: 0.134704, z: 0.0381 },
perHandRelativeRotation: Quat.fromPitchYawRollDegrees(-180, 90, 45)
}
}
}

View file

@ -76,11 +76,11 @@ void AvatarActionHold::updateActionWorker(float deltaTimeStep) {
auto mirroredRotation = _perHandRelativeRotation;
auto mirroredPosition = _perHandRelativePosition;
// Mirror along z axis
mirroredRotation.z *= -1;
// Mirror along x axis
mirroredRotation.x *= -1;
mirroredRotation.w *= -1;
mirroredPosition.z *= -1;
mirroredPosition.x *= -1;
rotation = palmRotation * mirroredRotation;
position = palmPosition + rotation * mirroredPosition;