[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
29
S
11
G
3
Posts: 655
Reputation: 4,925

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
24
S
5
G
2
Posts: 40
Reputation: 2,654

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
77
S
29
G
78
Posts: 729
Reputation: 46,069

Previous

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 0 guests