Mouse position being read wrong on mac

Gotten loads of reports over the past few days of the cursor in apoc being offset, but whenever we’d test it it worked fine. Today we found out it was a mac only issue. The red cross hair in these pictures should be lined up on the mouse:

imgur.com/TIRrK7h.png
imgur.com/BH8fe34.png

Users on PC don’t seem to have this issue, the crosshair lines up with the mouse. All the people who report it are playing on a mac.

Repro steps courtesy of Baumz: http://devforum.roblox.com/t/mouse-position-being-read-wrong-on-mac/26413/3?u=[redacted]

That gui is positioned by reading from player:GetMouse().X and .Y. My guess as to what is going on: PC top bar is accounted for, mac isn’t. This probably effects a lot of older games that never made the switch to UIS ontop of games that still use the player mouse.

I haven’t been able to test if UIS has this issue too as I don’t have a mac or have anyone available who can repro on a mac. I also have not been able to test to see if roblox tools are effected by this.If anyone on here can confirm a repro that’d be mighty kind of you.

Well I tested it out at apoc, and the bug was reproducible:

However, using this line of code I was not able to reproduce it on mac

local cur = script.Parent.ScreenGui.GamePadCursor.C local mouse = game.Players.LocalPlayer:GetMouse() while true do cur.Position = UDim2.new(0,mouse.X-25,0,mouse.Y-25) wait() end -- minus 25 is there since cursor is size 50x50
results of code above:

Ok I figured it out, when you Teleport on a Mac, it’s like the Mac forgot about the Top bar

Reproduce Place: MouseCursor - Roblox

Repro Steps:

  1. Join the server (On a Mac) and noticed cursor moves correctly to mouse icon.
  2. 10 seconds later you will be teleported to another server
  3. on that server the cursor and mouse icon will not be aligned.

Video Repro: - YouTube

2 Likes

Never would have thought that teleporting would be the cause, nice find.

aaaand now we have repro steps, woohoo!

I’ll take a look into this, thanks!

1 Like

Found the issue, should see this resolved about one week from now.

1 Like

As of Thursday’s update, now all users in our game are experiencing this issue. In addition, all UI at the topbar level seems to be gone. I can’t make this up. The topbar now makes any UI up there disappear.

1 Like

Temporary fix you can use that I imagine is better than having a broken game:

Some people in my game don’t have the cursor offset issue, but I do.
:sob:

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.