mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 13:43:49 +02:00
Remove the shrink cap in radar mode
This commit is contained in:
parent
12770142fa
commit
c19664e3ca
1 changed files with 10 additions and 6 deletions
|
@ -29,7 +29,7 @@ var MOVE_BY = 1;
|
|||
// Swipe/Drag vars
|
||||
var PINCH_INCREMENT_FIRST = 0.4; // 0.1 meters zoom in - out
|
||||
var PINCH_INCREMENT = 0.4; // 0.1 meters zoom in - out
|
||||
var RADAR_HEIGHT_MAX_PLUS_AVATAR = 40;
|
||||
var RADAR_HEIGHT_MAX_PLUS_AVATAR = 80;
|
||||
var RADAR_HEIGHT_MIN_PLUS_AVATAR = 2;
|
||||
var RADAR_CAMERA_DISTANCE_TO_ICONS = 1.5; // Icons are near the camera to prevent the LOD manager dismissing them
|
||||
var RADAR_ICONS_APPARENT_DISTANCE_TO_AVATAR_BASE = 1; // How much above the avatar base should the icon appear
|
||||
|
@ -811,19 +811,23 @@ function avatarRemoved(QUuid) {
|
|||
********************************************************************************************************/
|
||||
var myAvatarIcon;
|
||||
var myAvatarName;
|
||||
|
||||
function distanceForCameraHeight(h) {
|
||||
if (h < 10) return 1;
|
||||
if (h < 50) return 2;
|
||||
return 5;
|
||||
}
|
||||
function renderMyAvatarIcon() {
|
||||
var commonY = Camera.position.y - distanceForCameraHeight(Camera.position.y);
|
||||
var iconPos = findLineToHeightIntersectionCoords( MyAvatar.position.x,
|
||||
MyAvatar.position.y + RADAR_ICONS_APPARENT_DISTANCE_TO_AVATAR_BASE,
|
||||
MyAvatar.position.z,
|
||||
Camera.position.x, Camera.position.y, Camera.position.z,
|
||||
Camera.position.y - RADAR_CAMERA_DISTANCE_TO_ICONS);
|
||||
commonY);
|
||||
if (!iconPos) { printd("avatarmy icon pos null"); return;}
|
||||
var iconDimensions = avatarIconPlaneDimensions();
|
||||
|
||||
var avatarPos = MyAvatar.position;
|
||||
var cameraPos = Camera.position;
|
||||
var commonY = Camera.position.y - RADAR_CAMERA_DISTANCE_TO_ICONS;
|
||||
var borderPoints = [
|
||||
computePointAtPlaneY(0, 0, commonY),
|
||||
computePointAtPlaneY(Window.innerWidth, Window.innerHeight, commonY)
|
||||
|
@ -899,7 +903,7 @@ function hideAllAvatarIcons() {
|
|||
function renderAllOthersAvatarIcons() {
|
||||
var avatarPos;
|
||||
var iconDimensions = avatarIconPlaneDimensions();
|
||||
var commonY = Camera.position.y - RADAR_CAMERA_DISTANCE_TO_ICONS;
|
||||
var commonY = Camera.position.y - distanceForCameraHeight(Camera.position.y);
|
||||
var borderPoints = [
|
||||
computePointAtPlaneY(0, 0, commonY),
|
||||
computePointAtPlaneY(Window.innerWidth, Window.innerHeight, commonY)
|
||||
|
@ -921,7 +925,7 @@ function renderAllOthersAvatarIcons() {
|
|||
if (avatarsData[QUuid].icon != undefined) {
|
||||
var iconPos = findLineToHeightIntersectionCoords( avatarPos.x, avatarPos.y + RADAR_ICONS_APPARENT_DISTANCE_TO_AVATAR_BASE, avatarPos.z,
|
||||
Camera.position.x, Camera.position.y, Camera.position.z,
|
||||
Camera.position.y - RADAR_CAMERA_DISTANCE_TO_ICONS);
|
||||
commonY);
|
||||
if (!iconPos) { print ("avatar icon pos bad for " + QUuid); continue; }
|
||||
if (avatarsData[QUuid].needRefresh) {
|
||||
var avat = AvatarList.getAvatar(QUuid);
|
||||
|
|
Loading…
Reference in a new issue