Myjestic Posted February 7, 2017 Share Posted February 7, 2017 I switches from babylon.js 2.4 to 2.5 and now getting the following error: Quote Uncaught TypeError: Cannot read property 'removeEventListener' of undefined I figured out that the following line is causing this error: freeCamera.inputs.attached.keyboard.detachControl(); Are there any changes in usage of detach / attach Control? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted February 7, 2017 Share Posted February 7, 2017 It works for me (but remember that you have to provide the control from where you want to detach) http://www.babylonjs-playground.com/#1MEMYN Quote Link to comment Share on other sites More sharing options...
Myjestic Posted February 8, 2017 Author Share Posted February 8, 2017 Little mistake, big impact With adding "canvas" to the line, everthing works as aspected. Quote freeCamera.inputs.attached.keyboard.detachControl(canvas); Thanks a lot, Deltakosh! GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.