[Plugin] Mouse Lock (v0.5)(UPDATED)

0 favourites
From the Asset Store
Total customisation of the input! You can combine inputs from all peripherals. Make your game accessible for everyone!
  • Karapan

    Glad it's working for you. However, it should work after minification. I had an issue with this before, but I thought I'd fixed it.

    Here's a slightly more recent version of mouse lock. I've exported w/ minification using this version before, it seems to work.

    https://www.dropbox.com/s/mici7sws7j0n3 ... .5.7z?dl=0

  • great work !!! ,, that plugin,,,, helped me a lot

    thank you !

    also I am gonna help u to fix one thing to get v0.6

    just change in

    document.pointerLockElement

    ----- > document.pointerLockElement =

    document["pointerLockElement"] ||

    document["mozPointerLockElement"] ||

    document["webkitPointerLockElement"];

    ..... now it will be working for chrome to detect if pointer is unlocked or not

    try it at my forum,,,,,

    its multiplayer game i am working on

  • Great plugin for NW.js games.

    But I'm experiencing problems on latest Chrome:

  • When I updated NW'js to v0.13.0 alpha 7 (Chromium 47), when I'm testing on NW.js my game gives this error:

  • tecbug

    thx for notifying, I'll take a look at it when I can and see if I can fix it

  • Hey TiAm, really nice plugin there!

    I found some bugs too. Whenever you hold any mouse or keyboard buttons, mouselockx/y and rawx/y will not follow mouse movement very accurately, even if the mouse isn't locked.

    I also had issues on a PC running Windows 10: it returned really low values for those, even if no buttons were pressed.

    Please tell me if you need any more specifications!

    Thanks!

  • tecbug TiAm

    I had that same error message with NW.js. At line 440 in runtime.js I just commented out everything like this:

    /*document.pointerLockElement =	document.pointerLockElement    	||
    											 commenting out the above line makes this work as intended. Don't know why.
    											 document["mozPointerLockElement"]	||
    											 document["webkitPointerLockElement"];*/[/code:rfg10o93]
    This also fixed the problem I had with "Mouse is currently locked" condition.
    
    A couple of lines above in the runtime.js file it actually says "//the below isn't working. Commented out for now."
    Was it supposed to be commented out and was just forgotten? 
    
    Haven't noticed any issues so far after doing that.
  • Real useful. Good work !

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • TiAm Are you planning to update this great plugin?

  • Thank♥

  • TiAm with this plugin is possible lock the mouse to move only in a given angle? How can i achieve that?

  • McKack You get the MouseLock working in NW.JS? i have the same problem but i not understand very well your solution, can you upload your MouseLock plugin please?

  • matriax

    I've uploaded it to my dropbox

  • the dropbox link for the plugin is broken and i need to download it for a construct 2 game im creating for school

  • Somebody can get working the plugin in the last C2 release, the r247?

    I remember get working in Babylon3D in browsers and Nw.JS but now not works. Tried the 0.3 and 0.5 version and the mouse get locked but frozen, not moves until you get unlocked again ¿? .

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