Corrects for singularity distortion. (#13925)
This commit is contained in:
@@ -117,7 +117,7 @@ public sealed class InteractionOutlineSystem : EntitySystem
|
||||
if (_uiManager.CurrentlyHovered is IViewportControl vp
|
||||
&& _inputManager.MouseScreenPosition.IsValid)
|
||||
{
|
||||
var mousePosWorld = vp.ScreenToMap(_inputManager.MouseScreenPosition.Position);
|
||||
var mousePosWorld = vp.PixelToMap(_inputManager.MouseScreenPosition.Position);
|
||||
entityToClick = screen.GetClickedEntity(mousePosWorld);
|
||||
|
||||
if (vp is ScalingViewport svp)
|
||||
|
||||
@@ -118,7 +118,7 @@ public sealed class TargetOutlineSystem : EntitySystem
|
||||
|
||||
// find possible targets on screen
|
||||
// TODO: Duplicated in SpriteSystem and DragDropSystem. Should probably be cached somewhere for a frame?
|
||||
var mousePos = _eyeManager.ScreenToMap(_inputManager.MouseScreenPosition).Position;
|
||||
var mousePos = _eyeManager.PixelToMap(_inputManager.MouseScreenPosition).Position;
|
||||
var bounds = new Box2(mousePos - LookupVector, mousePos + LookupVector);
|
||||
var pvsEntities = _lookup.GetEntitiesIntersecting(_eyeManager.CurrentMap, bounds, LookupFlags.Approximate | LookupFlags.Static);
|
||||
var spriteQuery = GetEntityQuery<SpriteComponent>();
|
||||
|
||||
Reference in New Issue
Block a user