Lock cursor in game?

  • 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?

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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...

  • 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...

  • 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?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)