Gamepad Virtual Cursor for UI is Live! [Opt-in Only]

We are excited to bring you the Gamepad Virtual Cursor! It is a mouse-emulation cursor for gamepad input, used for interaction with game user interface (UI) that were not necessarily designed or customized for gamepad navigation. Currently, the default is off, so you would need to enable this in your game if you’d like to use this feature.

Why did we implement the Virtual Cursor?

We wanted to provide a solution that works for all types of UI layouts automatically, especially when it was primarily designed for a mouse cursor. This led us to build a mouse-like cursor for gamepads that provides easier UI navigation across all Roblox games. This also unlocks gamepad UI support for games that are menu-heavy, that did not previously work with gamepads at all!

Previous Studio Beta Post:

Studio Beta → Live on Production

The Virtual Cursor was previously available in Studio Beta and now we have fully released it as an “opt-in” feature, so you can enable it in your game if you want to try it out. If this is determined to be a better solution for gamepad UI control, we will consider making this the default going forward, so please give us your feedback!

How to Turn On the Virtual Cursor

We have introduced a new property on StarterGui called VirtualCursorMode, as a method to opt-in to this feature.

This property includes 3 settings:

  • Disabled - turns off the virtual cursor and uses the current UI navigation behavior
  • Enabled - turns on the Virtual cursor
  • Default - this is currently set as “Disabled”

image

Set the Virtual Cursor “Enabled” to allow your players to use this feature. We suggest testing this out in the event we potentially move to this system as the default for UI navigation.

How It Works:

The Gamepad Virtual Cursor will work in any Roblox place, unless custom gamepad navigation controls have been set up. Use the left thumbstick to move the cursor around the screen to highlight UI buttons/menus. Triggering the UI button is the same as before - simply press the A Button to trigger or interact with the highlighted UI element.

The Virtual Cursor selects the closest GUI button (TextButton or ImageButton) with the highest ZIndex. Virtual Cursor will ignore objects with Selectable set to false or Active set to false. If the cursor is hovering over several UI objects, the object that is closest to the center of the cursor will be highlighted.

You may also notice that the cursor will automatically slow down when it hovers over an interactable UI element. We did this to reduce the chance of a player accidentally scrolling past the UI element. Once the cursor moves off of the UI element it will return to full scrolling speed.

The Virtual Cursor essentially acts like a mouse for certain events. You will be able to listen to MouseEnter, MouseMoved, and MouseLeave events as well as the mouse position using GetMouseLocation for the virtual cursor - just as if the player was using a mouse

What if I already have custom gamepad UI support?

If you already set up custom gamepad menus and navigation, you are awesome! We suggest you review the functionality of the virtual cursor and decide whether you want to keep your custom controls or use the new system. After reviewing, if you would like to keep your custom solution, the virtual cursor can be disabled.

Setting AutoSelectGuiEnabled to false for all players will prevent the virtual cursor from running. In order to get UI selection, you will have to manually set the SelectedObject .

For example insert a LocalScript in StarterPlayer/StarterPlayerScripts with this code

-- Only use this if you do not want virtual cursor in your game!
local guiService = game:GetService("GuiService")
guiService.AutoSelectGuiEnabled = false

In addition, bind over view button, some other button to start UI selection.

Things to Look Out For:

If you hover over a GUI button that you expect to be highlighted but it is not, make sure the button property Selectable is set to true.

If you bind the view button (or equivalent button) to start UI mode but do not set AutoSelectGuiEnabled to false, you will get both the virtual cursor and the old UI selection system. Try not setting an initial SelectedObject and let virtual cursor handle the navigation! Or, if you want to keep your current navigation, simply set AutoSelectGuiEnabled to false.

In addition, you will need to disable the virtual cursor if you are using the view button for a custom bound special action or functionality. If you do not set AutoSelectGuiEnabled to false, the virtual cursor will be active.

Known Issues:

Fix is shipping soon

  • Selecting a Tool from the Toolbar does not equip it (shoulder buttons to equip/switch works as expected)
  • Hovering over a Proximity Prompt with VC and pressing A won’t activate it (pressing the gamepad button displayed on the prompt works)
  • Emotes from the emotes menu can only be selected when the Virtual Cursor is toggled off. If you toggle the VC on, you’ll have to toggle it back off to select an emote

Additional Issues

  • Clicking and dragging a UI element is not currently supported
  • Unable to scroll up or down in scrolling frames (we are considering use of the d-pad to scroll, when a scrolling frame is highlighted)
  • BillboardGui or SurfaceGui interaction is not currently supported
  • TextBox interactions are not currently supported but we are actively looking at solutions

Feedback

Let us know what you think (the good and the bad)! If you run into issues with this feature in your game, please reply with the details in this post. Also, if you enable virtual cursor in your experience, please leave a link to it below! The feedback will help us continually improve this feature. If you are running into issues, please let us know! We will actively work with developers to ensure this feature can work well in their experiences. Thanks.

260 Likes

This topic was automatically opened after 12 minutes.

Nice feature, I hope to see this implemented in games properly in the future. Great job!

18 Likes

Can you show how the 3D UI works in the first video?

This link doesn’t work.

4 Likes

This is a very cool feature, I personally will use this for most of my games that support gamepads!

9 Likes

I have to admit these kind of updates always get me a bit concerned. It’s never good to give developers breathing room to provide sub-standard experiences like this, and allowing these kind of experiences can only detriment players’ views of the platform.

8 Likes

I’ve been wanting this for so long, you don’t know how many times I’ve accidently purchased something by struggling to use UI with a Xbox controller.

5 Likes

Updated the link. Should be: Gamepad Virtual Cursor - Studio Beta

7 Likes

I don’t understand, could you explain more? I think it’s really good as xbox ui controls have always been clunky.

6 Likes

I know right! I don’t get anything wrong with this. They also mentioned that if you already have custom xbox controls, you could just turn it off with a script lol.

3 Likes

Loving this feature already, this is so much more helpful as if I was to make a xbox compatible UI I would have to change so much of my UI for a single platform

Can’t wait to give this a try!

5 Likes

There are some major games such as Destiny that use a similar system. I wouldn’t view this as sub-standard, just “different”. The traditional highlight method and the virtual cursor are both valid design choices.

7 Likes

REMINDER - if you turn this on in your game, share the link here so we can all check it out!

11 Likes

Wasn’t enabled when I tested your test place.

5 Likes

This is better than pressing a button! Great job roblox.

6 Likes

https://www.roblox.com/games/5422898602/Kool-Killer

5 Likes

Will it be automatically enabled in the new baseplate?

1 Like

That was my friend’s place, sorry.

2 Likes

It would be nice if there was some customization for it to fit the style of the game, for example, a more golden and detailed cursor for a fantasy/medieval type game. I think there’s a lot of potential with game interfaces especially if we’re given more control and customization with the existing UI we have to work around.

6 Likes

This has been my issue with all of the new updates that can potentially break games so far. For now, it’s fine. However, if you plan to change the default to enabled, the default option should not exist, or should not be changed. It’s fine to have it enabled for new places, but existing places should always have to opt-in, especially with an update not required. Forcing updates that are not required is dumb and should not be a thing.

4 Likes