Set mouse position

I would like to be able to set the mouse’s position to accomplish this:

Currently it’s impossible to do that and the user would have to continually move their mouse to move the slider by one tick (really slow process)

Some other use cases for setting the mouse’s position are:

  • Custom mouse sensitivty (currently only possible to modify camera sensitivity – not the amount of pixels the mouse moves)
  • In first person games, move mouse to last known position before opening a modal GUI (super annoying in games like Warframe where they just move it to the top left and you have to move it allll the way to the bottom right to click something over and over)
  • Moving the mouse to the close button of a prompt as soon as it opens for items that only need to be quickly glanced at and then closed (imagine opening the Discourse search, clicking “Options”, and then having the mouse move to the exit button)

I imagine there are more use cases as well – those are just the ones I personally have wanted to do in a project but couldn’t.

There are obviously some risks with implementing this on its own, but it’s possible to alleviate all of those:

  • Preventing people from leaving the game by never letting their mouse enter the “Leave Game” button / moving their mouse to the “Close Menu” button when they’re about to click
  • The mouse should not be able to have its position set when a modal member of the ROBLOX CoreGui is displayed on the screen
  • Moving the mouse to where the purchase button would be and then prompting a purchase
  • The purchase GUI tweens in, so nobody will be clicking a purchase button without knowing it since the tween in gives them time to realize that a purchase was promoted. As long as the purchase button is disabled until the tween is finished, nobody can set the mouse’s position to force people to buy products

It’s inevitable that someone will rush to post as soon as seeing the thread title without reading the risk section, but regardless now most everyone does know that those risks can be mitigated. I can’t think of any other risks, but if there are any, feel free to post them so we can devise countermeasures. Feel free to share your own use cases too. Once we’re sure there aren’t any risks in allowing the mouse’s position to be set, it’d be a wonderful feature to have.

29 Likes

This wouldn’t work so well on mobile. I’m all for it, though. Not sure how they will get around forcing mouse on purchasing, your solution doesn’t really do much. They should just disable the API while purchase GUI’s are up.

4 Likes

Mobile doesn’t have a front-end mouse to begin with, so this feature doesn’t even concern mobile. Trying to find ways to make it compatible is like trying to make a PC client compatible with a gyroscope. There’s no need to make an input-related feature compatible with a device that doesn’t have the appropriate peripheral.

That’s what I suggested?

4 Likes

Old reply old reply Old reply old reply

1 Like

Purchase prompts are a member of the ROBLOX CoreGui.

2 Likes

Old reply old reply Old reply old reply

1 Like

To make it more readable I separated it into

  • problem
  • solution
  • problem
  • solution

Even though the first solution was a solution to both the first and second problems, I didn’t list it under the second again because I didn’t see a need to duplicate it when it had already been posted

That’s what the feature request is for.

1 Like

As a Roblox developer, it is currently too hard to have full control over the roblox mouse. Many of the properties are strictly readme, and as such lead to many hacky solutions to achieve the intented behavior wanted.

In a baseball game I am working on, there are two camera angles, and ideally when a player flips between these angles the mouse should remain in a position relative to a part. Currently this is not possible, as roblox does not provide a method of positioning a mouse.

If Roblox is able to address this issue, it would improve my development experience because it would offer me and others more control over the mouse, and eliminate hacky methods of controlling or limiting the mouse.

16 Likes