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: Mouse position being read wrong on mac - #3 by Baumz

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:
https://gyazo.com/55b3577c48cd4c278b48e18f6696ae87

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:
https://gyazo.com/7f33d4ecf40bd12535386c1ac67dd6d9

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: https://www.youtube.com/watch?v=GZfzAq36jWc

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:

1.png

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

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.