Search the Community
Showing results for tags 'input keyboard'.
-
Hello everyone ! I'm new to javascript. yet I have done some scenes in babylonjs! and I have two questions about I did a scene for training in order to better understand the babylonjs engine. and with this code: var moveLeft = false, moveRight = false; window.addEventListener("keydown", function(e) { if (e.keyCode == 65) { // A or Q65 || e.keyCode == 81 moveLeft =true; moveRight = false; } else if (e.keyCode == 68) { // D moveLeft = false; moveRight = true; } });//agora um negativo - como ta em escuta. window.addEventListener("keyup", function(e) { if (e.keyCode == 65) { // A or Q || e.keyCode == 81 moveLeft = false; } else if (e.keyCode == 68) { // D moveRight = false; } }); moves a cube and when it moves to the pressing example the letter 'A'. the browser takes this action as well and open a search bar like to know how do I that after charging a tight keys scene to be captured or something. sorry no idea how to do it. the second question, stupid means someone here already developing a game or something and published for android? how did you do it ? phonegap? what is the best way?
- 13 replies
-
- input keyboard
- action
-
(and 1 more)
Tagged with: