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

Post your completed addons to share with the community

Post » Sat Oct 14, 2017 12:57 pm

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 ¿? .
B
30
S
12
G
3
Posts: 685
Reputation: 5,112

Post » Thu Nov 09, 2017 11:27 pm

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

McKack wrote:@tecbug @TiAm
I had that same error message with NW.js. At line 440 in runtime.js I just commented out everything like this:
Code: Select all
/*document.pointerLockElement =   document.pointerLockElement       ||
                                  commenting out the above line makes this work as intended. Don't know why.
                                  document["mozPointerLockElement"]   ||
                                  document["webkitPointerLockElement"];*/

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.
Last edited by undeadbobop on Thu Nov 09, 2017 11:53 pm, edited 1 time in total.
Need custom controls, video & sound options, and a PC like menu system with screenshot manager?
Image
B
25
S
6
G
2
Posts: 40
Reputation: 2,779

Post » Fri Jan 12, 2018 5:44 pm

Image

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.
ImageImageImage
B
81
S
30
G
78
Posts: 763
Reputation: 46,417

Post » Mon Mar 19, 2018 8:02 pm

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! :mrgreen:
B
9
S
2
Posts: 5
Reputation: 541

Post » Thu May 24, 2018 6:44 am

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 :roll:
B
4
Posts: 21
Reputation: 250

Previous

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 2 guests