GameEngine.Info.ViewPortInfo.GetWorldCoordinates C# (CSharp) Method

GetWorldCoordinates() public method

Returns the translated world coordinates of the specified position on the viewport in pixels.
public GetWorldCoordinates ( Point position ) : Vector2
position Microsoft.Xna.Framework.Point Point value representing the pixel position on viewport.
return Microsoft.Xna.Framework.Vector2
        public Vector2 GetWorldCoordinates(Point position)
        {
            return new Vector2(
                position.X / ActualZoom + pxTopLeftX,
                position.Y / ActualZoom + pxTopLeftY
                );
        }