- Home /
How to make input.mousePosition Vector2 centered to middle of screen?
How to make input.mousePosition Vector2 centered to middle of screen, so it wouldn't be based from bottom left corner.
Answer by Zukas · Sep 14, 2014 at 10:59 AM
I'd make a new Vector2/3 variable that would be mousePosition subtracted by half of the screen width for X and half of the screen height for Y using Screen.Width
and Screen.Height
Hope it helps!
Answer by Graham-Dunnett · Sep 13, 2014 at 08:56 PM
You can't change the value that gets returned. But you can subtract a vector that's half the width and height from what's returned.
Your answer
![](https://koobas.hobune.stream/wayback/20220613162922im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Getting weird results when subtracting two identical numbers 0 Answers
Issues with mouse moving camera 0 Answers
Convert Mouse Position to move a cube on 1-axis. 1 Answer
Vector3 to Float? Trying to accomplish a MouseDrag.. 1 Answer
How to detect if mouse is over GUI element in Web Player? 0 Answers