Hello,
I’m trying to calculate the distance between two screen points. I’m using Vector2.Distance, however I’m getting inconsistent results on different resolutions (duh). I’m wondering how I can achieve a consistent result.
I’ve tried incorporating the screen ratio, Screen.width / Screen.height, but I’m either applying it incorrectly or it just isn’t needed for this.
// try 1
float distance = Vector2.Distance(mousePosOne, mousePosTwo) / screenRatio;
//try 2
float distance = Vector2.Distance(mousePosOne / screenRatio, mousePosTwo / screenRatio);
Any guidance would be appreciated!