Gamepad Virtual Cursor: APIs

I love it, as someone who has fairly complex GUIs, setting it up to work with controllers properly takes a good chunk of time. I wanted to use the virtual cursor but wasn’t sure as it sometimes would stay active after the users left the menu (as there wasn’t the option to toggle it manually) or it wouldn’t appear so the users wouldn’t be able to do anything. The problem is that these 2 problems were being perceived as bugs when it reality they were not. Will definitely use it now, keep up the great work.

5 Likes

Hey! Glad you’re using virtual cursor now. Link your game here please!

6 Likes

They won’t error on that platform, calling the APIs error will temporarily produce a warning until the issue can be fixed.

7 Likes

Can we have a way to keep the virtual cursor always enabled?

I know that you can just enable the cursor in a RenderStepped loop, but it feels rather hacky.

I want the player to always use the virtual cursor, and make it so pressing the Back button on the gamepad does not go back to the normal cursor.

EDIT: You can already do this:

game.GuiService.AutoSelectGuiEnabled = false
game.GamepadService:EnableGamepadCursor(nil)
4 Likes

Hey, can you provide a screenshot for this please?

5 Likes

Can you give a bit more detail for what’s going wrong? Thanks

5 Likes

It’s just that it can be a bit distracting and in your face when hovering over UI elements that are a lot smaller than the virtual cursor circle. An easy solution here would be to just scale up the color wheel, but I can think of other situations where I’d like to be able to dynamically scale the cursor up and down. Using a slider, for example, would look a lot smoother to me if I could just shrink the cursor down as you enter the bounds of the element rather than having a giant circle 4x the size of the slider notch.

I feel like I’d be able to create a smoother experience while having to make minimal changes to the UI itself if I were able to do this. The UI below is from a game in which the UI already existed for ages before they decided to add console compatibility. Being able to scale the cursor down dynamically would at the very least allow me a transitional time in which I can replace the older UI with a better design that’d make more sense with a controller.

image

9 Likes

I was waiting for this update and its exciting that its finally here! : )

4 Likes

Are there plans to do something with the gamepad highlight? I personally would like to see it removed when using the virtual cursor, because it really gets in the way of custom hover effects and other things, and it generally doesn’t look very good.
image

8 Likes

For now no, there are no plans to change/remove the highlight.

4 Likes

Love the update. Now there just needs to be an API for changing the size of the cursor.

12 Likes

I know yeah but good job just get Roblox studio game news tomorrow

5 Likes

Nice update. That was a missing feature for my game My Prison. Now I will be able to make Gamepad controls better.

Thank you

4 Likes

Really loving the virtual cursor, but I would like to know when :GetGamepadCursorPosition() will be available for us to use since I get an error saying that I am lacking permission. It seems the cursor’s position and the mouse’s position are different and I need check if the mouse is hovering on/off certain UI elements at times.

7 Likes

Hey everyone!

Just a small update, the issues with Virtual Cursor not starting in the correct position on Xbox and not working on the Roblox downloaded from the Microsoft store have been fixed!

Please respond to this thread with any new issues or feel free to message me directly if you need help with any Virtual Cursor feature.

Thank you!

6 Likes

Not a huge bug but I did notice that when using the Virtual Cursor, the mouse location (UserInputService:GetMouseLocation()) doesn’t get updated unless your cursor’s velocity changes. I took a gif showing the issue here:

The red dot is being updated every frame and should match the cursor’s position at all times, but it doesn’t do that when the cursor’s velocity is constant. You can take a look at the setup here:
virtual_cursor_bug_demo.rbxl (36.5 KB)

7 Likes

Hey!

This is a known issue with Virtual Cursor. Have you run into any problems using the feature because of this bug?

4 Likes

Having an issue with the virtual cursor being able to click through buttons.

I currently use fullscreen buttons as a way to ‘sink’ input behind modal popups so the user cannot interact with menus that are partially obscured. When using a mouse, the user is unable to click through the button but the virtual cursor will still select buttons behind the input ‘sink’
virtual_cursor_repro.rbxl (37.9 KB)

GamepadService:EnableGamepadCursor() also has an ambiguous error when called without any arguments, implying that it cannot be called with a nil argument (it can, it just has to be specified)
image

6 Likes

Wanted to bring attention to this again, as it is still blocking me from using virtual cursor in my experience.

4 Likes

Hey!

You could set your fullscreen button’s Selectable property to True, and avoid user input that way.

The virtual cursor being able to select the button in your demo is the correct behavior. Feel free to DM me if you need more in depth help.

Thank you!

4 Likes