Disable dot cursor when input begins from a controller

I’m making a couch co-op game where multiple devices will be connected at once, e.g. one player uses keyboard+mouse and another uses a controller. However because a controller is being used there is an annoying white dot that appears in the middle of the screen which disables the mouse. You can see in this clip what I mean, it’s messing up the inventory system when the keyboard+mouse player is doing stuff and the controller is being pressed:

Ideally I need to get rid of the whole white dot thing entirely so the controller player and mouse can co-exist. I don’t want to have to make a whole custom mouse system. I saw that it might be possible to hide the white dot, but that doesn’t do anything about the mouse disappearing.

Try this
https://create.roblox.com/docs/reference/engine/classes/GamepadService#DisableGamepadCursor

Unfortunately for your situation, that little white dot is the mouse. When a player begins using a gamepad, the engine locks the mouse to that point on the screen and changes the icon to look like that. UserInputService:GetMouseLocation() will point to that location, and both players interacting at the same time will cause conflicts. You can hide it by hiding the mouse altogether with UserInputService.MouseIconEnabled = false, but that doesn’t really solve your problem…

The only natively-supported multiplayer input format is multiple gamepads (and I’m not even sure that works with the default UI navigator, so interpret this statement as having an asterisk). You will ultimately need a custom implementation for your use case. You’ll also want to avoid using ContextActionService for input processing since right trigger pulls trigger both Enum.KeyCode.ButtonR2 and Enum.UserInputType.MouseButton1 handlers, at least for Enum.UserInputType.Gamepad1 input. Not sure about others. Or why it does in the first place, but my speculation is ROBLOX trying to improve default gamepad support in games where developers themselves haven’t.

I think that’s something else, the gamepad cursor is a toggleable mouse that you can use on controller but it’s different to the white dot thing.

That sucks… I guess I could disable the mouse and make the whole game playable with keyboard only, which wouldn’t be too much of a stretch.

How can I post this as a feature request or something? Do you think it would be possible to get an option to remove this dot added into Studio? I don’t see any downsides to that, as long as it’s enabled by default.

local uis = game:GetService("UserInputService")
local plr = game:GetService("Players").LocalPlayer

uis.LastInputTypeChanged:Connect(function(input)
	if input.Name:find("Gamepad") then
		plr:GetMouse().Icon = ""
		uis.MouseIconEnabled = false
	end
end)

Edit: Yeah, no luck, this only appears to prevent whether a gamepad can change the selected UI instance. However, when LastInputType updates to a gamepad, the mouse/cursor icon is still forced into gamepad mode, and the gamepad can still enter UI selection mode.

I’m wondering if SetNavigationGamepad could address the issue here. I’m not sure I’ve ever needed to use this function, so I don’t know the behavior but the documentation stating “sets whether the specified gamepad can move the GuiObject navigator” sounds promising. I’ll do some testing in the morning.

That one is using LastInputTypeChanged, so at first it don’t look like it’s working until you move. Worked fine when testing..

The GuiObject navigator might be the blue rectangle that selects UI elements, I’m not sure whether that would affect the cursor dot

That’s good for hiding the cursor but I need to keep the normal mouse on screen somehow. I might use this method to just disable the cursor completely and make it a keyboard-only game.