mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 03:19:35 +02:00
Updated orientation of tablet when no hand controllers are present.
This commit is contained in:
parent
8304aa7b19
commit
4e4545ac00
1 changed files with 3 additions and 3 deletions
|
@ -58,11 +58,11 @@ function calcSpawnInfo(hand, height) {
|
||||||
rotation: lookAtRot
|
rotation: lookAtRot
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
var front = Quat.getFront(MyAvatar.orientation);
|
var front = Quat.getFront(Camera.orientation);
|
||||||
finalPosition = Vec3.sum(Vec3.sum(MyAvatar.position, Vec3.multiply(0.6, front)), {x: 0, y: 0.6, z: 0});
|
finalPosition = Vec3.sum(Camera.position, Vec3.multiply(0.6, front));
|
||||||
return {
|
return {
|
||||||
position: finalPosition,
|
position: finalPosition,
|
||||||
rotation: Quat.lookAt(finalPosition, MyAvatar.getHeadPosition(), Y_AXIS)
|
rotation: Quat.multiply(Camera.orientation, {x: 0, y: 1, z: 0, w: 0})
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue