Lock cursor in game?

Discussion and feedback on Construct 2

Post » Tue Mar 25, 2014 7:33 pm

I'm talking about locking the cursor so you don't accidental click outside of the game window during a frenetic moment.

As far as I know, there's no way to do this. I can see this could be a bad feature in the wrong hands...but, damn, it would be nice for fast paced games w/ mouse aim/navigation. Maybe if it had a fixed 'unlock' button? ESC maybe, or one of the F keys.

Any plugins that can do this? Any thoughts?
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Post » Tue Mar 25, 2014 7:56 pm

I've seen games that do that, the Browser pops up a window asking if the game can have permission to lock the cursor. I don't know that Construct2 can trigger that though. My "Orbital bomb bounder" could sure use it.
B
240
S
62
G
33
Posts: 903
Reputation: 40,589

Post » Tue Mar 25, 2014 11:40 pm

@Ashley

Know there's a lot on the burner, but would this be possible? It would be okay if the game had to ask first. I guess being a klutz doesn't help, but I'm finding the shooter I'm working on almost unusable without being able to lock the mouse. The only way to tame it is to slow the game down...and I'd hate to have to do that... :cry: :mrgreen:
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Post » Tue Mar 25, 2014 11:45 pm

Someone posted about this a couple weeks ago.
It is called Pointer Lock or Mouse Lock and is only supported in Chrome and Firefox right now. Once activated, all mouse movements are reported as relative values until the game releases the mouse.

It should be quite easy to incorporate into C2, and until then it would probably be fairly easy to make a plugin to do it...
B
98
S
35
G
20
Posts: 438
Reputation: 17,875

Post » Wed Mar 26, 2014 3:32 am

Never done a plugin before...and I wish it was in the engine...but I might have to try and take a crack at it.

Or... :!:

@rexrainbow? Pretty please? :D
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 14 guests