public static Vector2 GetMouseOnMap() { posMouse = Input.mousePosition; posCam = Camera.main.transform.position; Vector2 v = MyCustomPosition.GetMouseOnGrid(); return(new Vector2(v.x * 1.25f, v.y * 1.25f)); }
public static Vector2 GetMouseOnSpace() { posMouse = Input.mousePosition; posCam = Camera.main.transform.position; Vector2 v = MyCustomPosition.GetMouseOnScreen(); return(new Vector2(v.x + (posCam.x - defaultPos_x) * 100, v.y + (posCam.y - defaultPos_y) * 100)); }
public static Vector2 GetMouseOnGrid() { posMouse = Input.mousePosition; posCam = Camera.main.transform.position; Vector2 v = MyCustomPosition.GetMouseOnSpace(); return(new Vector2(((int)(v.x / 125) - 2), ((int)(v.y / 125) - 2))); }