Make clickable 1% nicer (#29706)

* Make vox roundstart

I believe all the issues are fixed.

* Click detection bandaid

* Make clickable 1% nicer

Still bad. Still doesn't handle multi-viewports well.
This commit is contained in:
metalgearsloth
2024-08-09 17:05:12 +10:00
committed by GitHub
parent de86fdb373
commit ecf278a89b
5 changed files with 223 additions and 154 deletions

View File

@@ -110,11 +110,15 @@ public sealed class InteractionOutlineSystem : EntitySystem
&& _inputManager.MouseScreenPosition.IsValid)
{
var mousePosWorld = vp.PixelToMap(_inputManager.MouseScreenPosition.Position);
entityToClick = screen.GetClickedEntity(mousePosWorld);
if (vp is ScalingViewport svp)
{
renderScale = svp.CurrentRenderScale;
entityToClick = screen.GetClickedEntity(mousePosWorld, svp.Eye);
}
else
{
entityToClick = screen.GetClickedEntity(mousePosWorld);
}
}
else if (_uiManager.CurrentlyHovered is EntityMenuElement element)