mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-11 21:52:26 +02:00
Don't display mini tablet in peripheral vision
This commit is contained in:
parent
c27bb04596
commit
fe8c237d64
1 changed files with 4 additions and 1 deletions
|
@ -545,8 +545,10 @@
|
|||
|
||||
// Visibility.
|
||||
MIN_HAND_CAMERA_ANGLE = 30,
|
||||
MAX_CAMERA_HAND_ANGLE = 30,
|
||||
DEGREES_180 = 180,
|
||||
MIN_HAND_CAMERA_ANGLE_COS = Math.cos(Math.PI * MIN_HAND_CAMERA_ANGLE / DEGREES_180);
|
||||
MIN_HAND_CAMERA_ANGLE_COS = Math.cos(Math.PI * MIN_HAND_CAMERA_ANGLE / DEGREES_180),
|
||||
MAX_CAMERA_HAND_ANGLE_COS = Math.cos(Math.PI * MAX_CAMERA_HAND_ANGLE / DEGREES_180);
|
||||
|
||||
|
||||
function enterMiniDisabled() {
|
||||
|
@ -640,6 +642,7 @@
|
|||
show = Vec3.dot(miniToCameraDirection, Quat.getForward(miniOrientation)) > MIN_HAND_CAMERA_ANGLE_COS;
|
||||
show = show || (-Vec3.dot(miniToCameraDirection, Quat.getForward(handOrientation)) > MIN_HAND_CAMERA_ANGLE_COS);
|
||||
cameraToHand = -Vec3.dot(miniToCameraDirection, Quat.getForward(Camera.orientation));
|
||||
show = show && (cameraToHand > MAX_CAMERA_HAND_ANGLE_COS);
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
Loading…
Reference in a new issue