Is it possible to have mouse back to middle?

I was wondering if it was possible to have the mouse go back to the middle of the screen.

For example, the cursor is hidden, and an object is moved using mouseMoveX / mouseMoveY, and once the cursor starts leaving the screen, it goes back to the middle of the screen. I have a clip of a game that does that, if u guys would like to see what I mean, I’ll happily share a clip here.

All I know is that Wick would somehow need permission to access the remote control. Like Zoom’s remote control, when it is granted the person with the RC can use their keyboard and mouse, etc. to do whatever they want on your computer, including search. That’s why you should only give it to people you can really trust.
If a webpage hypothetically asked me to give it remote control, I would certainly just close the tab and never visit it again. I don’t even know if Wick can do that. (it might, who knows)
Did that make sense in any shape or form?

hmm, a page never really asked me to give it remote control.

You know how a 3d view would change as you move the mouse, and somehow the mouse never leaves the screen? That’s what I meant by “returning the mouse to the middle.” Though, rereading ur post, it might still have to do with giving the website control…

Thanks for the reply @awc95014

well the only other way i can think of is a entity that follews the mouse and hids it
like if a white circle followed the mouse it would be harder to see (or not lol)
probably not a good way tho

To hide a mouse, you could just use the “hideCursor()” code, that’s easier than using a white circle since some people’s cursor can be black (like mine), unless if u were using windows or some other device.

Here’s what I meant by cursor moving back:


I’m kinda too lazy to post it on my yt, but visit the link above, and watch the cursor closely
(the recording is back in feb 25, and I just noticed that the recording somehow showed what the hidden mouse was doing)

ohhhh that makes more sense :PPPPPP

This is all I can really help with because I have pretty much no clue what happens.

1 Like

Thanks, @awc95014


That’s exactly what I needed! I’ll try to look for a way to plug this in wick.

(Though is it possible to “pointer lock” the cursor in wick? Maybe @Luxapodular or anyone might know)

Hey @Hamzah_Alani, you should be able to ask the page to take control f the user’s cursor just by adding the code int he pointer-lock documentation that @awc95014 shared. You can add that as code on your first frame, and the user should be told that their mouse is being controlled. I think you can then lock the mouse’s position, and you’ll have to use the mouse movements sent b the pointer lock api, rather than mouseX, mouseY.

As this is a pretty advanced feature, I don’t see it being directly added soon, but I do think it has a place in the future.

2 Likes