mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 17:39:26 +02:00
Fix tilt on tablet for HMD users without hand controllers
This commit is contained in:
parent
200105c856
commit
3db8c5b4a7
1 changed files with 2 additions and 1 deletions
|
@ -64,9 +64,10 @@ function calcSpawnInfo(hand, height) {
|
||||||
} else {
|
} else {
|
||||||
var front = Quat.getFront(Camera.orientation);
|
var front = Quat.getFront(Camera.orientation);
|
||||||
finalPosition = Vec3.sum(Camera.position, Vec3.multiply(0.6, front));
|
finalPosition = Vec3.sum(Camera.position, Vec3.multiply(0.6, front));
|
||||||
|
var orientation = Quat.lookAt({x: 0, y: 0, z: 0}, front, {x: 0, y: 1, z: 0});
|
||||||
return {
|
return {
|
||||||
position: finalPosition,
|
position: finalPosition,
|
||||||
rotation: Quat.multiply(Camera.orientation, {x: 0, y: 1, z: 0, w: 0})
|
rotation: Quat.multiply(orientation, {x: 0, y: 1, z: 0, w: 0})
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue