Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

[BUG-226977] [mac] World Map shows avatar's field of view (frustum) at wrong position on Viewer 6.2.1 #5405

Open
sl-service-account opened this issue May 11, 2019 · 1 comment

Comments

@sl-service-account
Copy link

sl-service-account commented May 11, 2019

What just happened?

The view frustum is drawn wrong on World Map like figure_1.png when UI Size != 1.0.

This case, 1.3.

What were you doing when it happened?

Open the World Map with UI Size = 1.3.

What were you expecting to happen instead?

The frustum is drawn centered like figure_2.png

Other information

On llworldmapview.cpp line 890,

#if defined(LL_DARWIN)
F32 ui_scale_factor = gSavedSettings.getF32("UIScaleFactor");
F32 ctr_x = ((getLocalRect().getWidth() * 0.5f + sPanX) * ui_scale_factor) * LLUI::getScaleFactor().mV[VX];
F32 ctr_y = ((getLocalRect().getHeight() * 0.5f + sPanY) * ui_scale_factor) * LLUI::getScaleFactor().mV[VY];
#else
F32 ctr_x = ((getLocalRect().getWidth() * 0.5f + sPanX) * LLUI::getScaleFactor().mV[VX]);
F32 ctr_y = ((getLocalRect().getHeight() * 0.5f + sPanY) * LLUI::getScaleFactor().mV[VY]);
#endif

But #if defined(LL_DARWIN) is no longer needed.
Just

F32 ctr_x = ((getLocalRect().getWidth() * 0.5f + sPanX) * LLUI::getScaleFactor().mV[VX]);
F32 ctr_y = ((getLocalRect().getHeight() * 0.5f + sPanY) * LLUI::getScaleFactor().mV[VY]);

is enough.

Attachments

Original Jira Fields
Field Value
Issue BUG-226977
Summary [mac] World Map shows avatar's field of view (frustum) at wrong position on Viewer 6.2.1
Type Bug
Priority Unset
Status Accepted
Resolution Accepted
Reporter Pell Smit (pell.smit)
Created at 2019-05-11T06:16:03Z
Updated at 2019-05-13T15:33:07Z
{
  'Build Id': 'unset',
  'Business Unit': ['Platform'],
  'Date of First Response': '2019-05-13T10:31:50.850-0500',
  "Is there anything you'd like to add?": 'On llworldmapview.cpp line 890,\r\n\r\n#if defined(LL_DARWIN)\r\n    F32 ui_scale_factor = gSavedSettings.getF32("UIScaleFactor");\r\n    F32 ctr_x = ((getLocalRect().getWidth() * 0.5f + sPanX)  * ui_scale_factor) * LLUI::getScaleFactor().mV[VX];\r\n    F32 ctr_y = ((getLocalRect().getHeight() * 0.5f + sPanY) * ui_scale_factor) * LLUI::getScaleFactor().mV[VY];\r\n#else\r\n    F32 ctr_x = ((getLocalRect().getWidth() * 0.5f + sPanX)  * LLUI::getScaleFactor().mV[VX]);\r\n    F32 ctr_y = ((getLocalRect().getHeight() * 0.5f + sPanY) * LLUI::getScaleFactor().mV[VY]);\r\n#endif\r\n\r\nBut #if defined(LL_DARWIN) is no longer needed.\r\nJust\r\n\r\n    F32 ctr_x = ((getLocalRect().getWidth() * 0.5f + sPanX)  * LLUI::getScaleFactor().mV[VX]);\r\n    F32 ctr_y = ((getLocalRect().getHeight() * 0.5f + sPanY) * LLUI::getScaleFactor().mV[VY]);\r\n\r\nis enough.\r\n',
  'ReOpened Count': 0.0,
  'Severity': 'Unset',
  'System': 'SL Viewer',
  'Target Viewer Version': 'viewer-development',
  'What just happened?': 'The view frustum is drawn wrong on World Map like figure_1.png',
  'What were you doing when it happened?': 'Open the World Map.',
  'What were you expecting to happen instead?': 'The frustum is drawn centered like figure_2.png',
}
@sl-service-account
Copy link
Author

Kyle Linden commented at 2019-05-13T15:31:51Z

Hi Pell,

Confirmed bug.

Thanks for the report!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant