Gamepad virtual cursor should be able to be toggled on/off by developer code

Currently, as of 7/11/21, the new virtual cursor for gamepad does not support the ability for developers to explicitly toggle it on or off at runtime through their code. The only way for the cursor to be enabled or disabled is to have the player press the window button on their xbox controller.

This makes it hard to create a good UX experience with UIs in my game. As a developer, if a player opens something like a Shop UI, I want to automatically toggle the virtual cursor on, since the UI does not work with controller out of the box otherwise. Right now, if a player were to open my shop UI, and they didn’t know how to enable the virtual cursor by pressing the window button, they would be under the impression that the UI is broken / non-functional, and would most likely leave the game.

There needs to be a way for developers to toggle the cursor on/off in their code to avoid this sort of a problem.

68 Likes

Just ran into this issue, which makes my game entirely unplayable for console players.

11 Likes

You could display a prompt onscreen when UI is opened, but AFAIK there is no way to tell if the user has enabled the virtual cursor so you can hide the prompt, short of guessing with a combination of detecting a gamepad and detecting mouse movement. It would be much nicer if we could just control this ourselves.

10 Likes

There is actually a Lua implementation of the virtual gamepad cursor made a long time ago that you can use as a workaround in the meantime. It was made by @TheGuyWithAShortName iirc but a really long time ago I made a fork of it that let you toggle it on / off. Here are some links to point you in the right direction.

Mine: Xbox Mouse Emulator - Roblox

His: Custom XBOX Cursor - Roblox

6 Likes

This has been addressed by Roblox!

7 Likes

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