[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!
  • 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 ¿? .

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Uncaught TypeError: Cannot assign to read only property 'pointerLockElement' of object '#<HTMLDocument>'

    at HTMLDocument.instanceProto.pointerLockChange (MouseLock_plugin.js:440) -< what the logs keeps telling me once a error happens when clicking around the screen and pressing buttons at same time, for shooter

    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:i765u74o]
    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.
    

    Thank you from the future, where this plugin hasn't been updated in several years, this fixed literally every bug I am having with it.

  • Hello Everyone!

    If you're interested in native-like pointer locking for your projects and games, no need to wait anymore. Feel free to click the link and download a new stable and enhanced mouselocking plugin.

  • Yay, just had the same problem in Colonel Justice's Stolfenwein for Construct 2. Just removed the lines undeadbobop mentioned in the runtime.js of the plugin. Works like a charm.

    By the way RealDannyyy you got a nice way to present your stuff! Like that!

  • Hallo. i have a problem dude. im following tutorial on youtube "how to make 3d game with q3d plugin" but they use mouse to control the camera and use the MouseLock plugin. and its not work on android. how can i change the mouse movement camera to sweeping touch movement camera?

    This is the event sheet for camera control with mouse.

    Q3D: Rotation from eular angles ->

    X = clamp(Q3DMaster.camRotX+MouseLock.RawY*mousespeed*-1,180,360)

    Y = Q3DMaster.camRotY

    Z = Q3DMaster.camRotZ+MouseLock.RawX*mousespeed

    Please help me

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