Is outputting
-0.07279693486590039 and 1.0727969348659003, which shouldn’t be possible as it should stay between 0 and 1.
I’ve read into documents, and it says that Mouse.ViewSizes should not account device safe areas unlike Camera,ViewportSize, so how and why is it giving me negatives and number exceeding 1?
Based off of my research and testing, Mouse.ViewSizeY behaves a bit weirdly.
First of all, the reason why Mouse.Y/Mouse.ViewSizeY outputs as negative is because Mouse.Y follows the Gui Inset positioning system, where y = 0 is under the top bar Core GUI (same as a GUI with position y = 0, basically the positioning in studio when not in-game since the top bar is added afterwards in-game), meaning that anything above this line is negative.
On the other hand, you are getting values above 1 due to the Mouse.ViewSizeY behaving a bit weirdly. Mouse.ViewSizeY is basically the inset height (size ignoring top bar) of the screen minus the top bar size. For example, if the top bar’s height is 58 pixels and the screen’s height is 565 pixels, Mouse.ViewSizeY would be: 565 - 58 = 507. I’m not sure if it’s just a studio bug or if it’s intentional, but the calculation for this value doesn’t make much sense.
If you want to get the screen’s size a different way, I would suggest using ScreenGui.AbsoluteSize (returns a Vector2) for an accurate measurement. You can also enable ScreenGui.IgnoreGuiInset, which makes y = 0 the true top position even with the top bar. You would however have to modify the Mouse.Y position due to it still following the inset positioning.
By checking the ScreenGui’s Absolute Size gives the same output as Mouse.ViewSize.Y, however you are correct on the Mouse.Y part, if I were to only just print mouse.y it’s able to give me negative values, Is there a way around this or is the only way is just to add the size Y of the top bar gui inset?