mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 18:42:58 +02:00
Adjust avatar thumb root joint angle to look better
This commit is contained in:
parent
560b9f012f
commit
404deba78d
1 changed files with 6 additions and 1 deletions
|
@ -46,7 +46,8 @@ var leapHands = (function () {
|
||||||
Quat.angleAxis(-180.0, { x: 0, y: 0, z: 1 })
|
Quat.angleAxis(-180.0, { x: 0, y: 0, z: 1 })
|
||||||
],
|
],
|
||||||
DESKTOP_CAMERA_TO_AVATAR_ROTATION =
|
DESKTOP_CAMERA_TO_AVATAR_ROTATION =
|
||||||
Quat.multiply(Quat.angleAxis(180.0, { x: 0, y: 1, z: 0 }), Quat.angleAxis(90.0, { x: 0, y: 0, z: 1 }));
|
Quat.multiply(Quat.angleAxis(180.0, { x: 0, y: 1, z: 0 }), Quat.angleAxis(90.0, { x: 0, y: 0, z: 1 })),
|
||||||
|
LEAP_THUMB_ROOT_ADJUST = [Quat.fromPitchYawRollDegrees(0, 0, 20), Quat.fromPitchYawRollDegrees(0, 0, -20)];
|
||||||
|
|
||||||
function printSkeletonJointNames() {
|
function printSkeletonJointNames() {
|
||||||
var jointNames,
|
var jointNames,
|
||||||
|
@ -479,6 +480,10 @@ var leapHands = (function () {
|
||||||
z: side * -locRotation.x,
|
z: side * -locRotation.x,
|
||||||
w: locRotation.w
|
w: locRotation.w
|
||||||
};
|
};
|
||||||
|
if (j === 0) {
|
||||||
|
// Adjust avatar thumb root joint rotation to make avatar hands look better
|
||||||
|
locRotation = Quat.multiply(LEAP_THUMB_ROOT_ADJUST[h], locRotation);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
locRotation = {
|
locRotation = {
|
||||||
x: -locRotation.x,
|
x: -locRotation.x,
|
||||||
|
|
Loading…
Reference in a new issue