Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What does Mouse.X/Mouse.Y return?

Asked by 6 years ago

So I am working on a project that requires me to know two things about Mouse.X/Mouse.Y which the wiki is lacking in. One of which goes as follows: How does zooming the camera in and out affect what will be returned with Mouse.X/Mouse.Y. So for example, if you kept your mouse in the same place, have the mouse return the X/Y position, then zoom out, and have the X/Y value of the mouse return it's value, would it return the same values? The other question asks how Mouse.X/Mouse.Y returns it value. What is the ratio that it returns the value of the X/Y position of the mouse? I'll need to know this value to be able to convert it to a number that I can use.

0
You could also just use the Hit property, but the X and Y value return its coordinates User#19524 175 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

Mouse.X and Mouse.Y returns the X and Y position of the mouse on your screen, respectively.

So yes, zooming in and out would maintain the same position. I am unsure what you mean by ratio but the max it can go is the size of your screen.

0
Thank you for answering my first question but what I mean by the ratio is what is the minimum number and the max number that it will return as? So for example, it could return -1 for being all the way left of the screen then return 1 for being all the way right of the screen or does it return 0 for all the way left and 180 for all the way right. beeswithstingerss 41 — 6y
0
I also need to know this same "ratio" for the Y axis if you could answer this question because in the above comment, I focused on explaining the X axis. beeswithstingerss 41 — 6y
0
The miminum X and Y can return is 0, the maximum would be your screen resolution's X and Y axises. Naxxanar 77 — 6y
Ad

Answer this question