masterdon Posted September 11, 2017 Share Posted September 11, 2017 Hi Team, I am having a PG here http://www.babylonjs-playground.com/#SUXKHY#43 . FYI, as per requirement, with the help of legendary @Wingnut, camera rotation has been disabled here. by limiting arcCam alpha and beta. Now i am trying to assign key events on canvas for mesh movements. keydown and keyup are working fine. however, keypress is failing. code is at line number 149. what could be the reason? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 11, 2017 Share Posted September 11, 2017 The keypress seems to work for me (PC/Chrome) Quote Link to comment Share on other sites More sharing options...
SvenFrankson Posted September 11, 2017 Share Posted September 11, 2017 KeyPress works because it logs, but with no effect in the scene when exchanging keypress and keydown events. In my browser, "keypress" has a different event object than "keyup" and "keydown" (keyCode is missing). KeyCode being deprecated (https://developer.mozilla.org/fr/docs/Web/Events/keydown), you might want to use a more reliable event property. Fixed here : http://www.babylonjs-playground.com/#SUXKHY#44 , if that's what your issue is. Best regards, 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.