public static Vector2 WorldToFog(Vector3 wpos, FogOfWarPlane plane, Vector2 offset, Vector2i resolution, float size) { return(WorldToFog(WorldToFogPlane(wpos, plane), offset, resolution, size)); }
// Snaps a world point to a fog pixel. It returns the position public static Vector2 SnapWorldPositionToNearestFogPixel(Vector2 worldpos, Vector2 offset, Vector2i resolution, float size) { Vector2 fogpos = WorldToFog(worldpos, FogOfWar.current.mapOffset, FogOfWar.current.mapResolution, FogOfWar.current.mapSize); fogpos = SnapToNearestFogPixel(fogpos); return(FogToWorld(fogpos, FogOfWar.current.mapOffset, FogOfWar.current.mapResolution, FogOfWar.current.mapSize)); }