mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-19 13:44:20 +02:00
Mirror on x instead of z
This commit is contained in:
parent
ddf82c35e1
commit
3cbe1bc4da
2 changed files with 7 additions and 7 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue