ssatguru / BabylonJS-CharacterController

A CharacterController for BabylonJS
Apache License 2.0
216 stars 46 forks source link

ie 11 issues #19

Closed ssatguru closed 4 years ago

ssatguru commented 4 years ago

in ie 11 jump using space bar and movement using arrow keys don't work. This is because the new version of controller uses key rather than keycode to capture keyevents. ie returns "Spacebar" rather than " " (returned by other browsers) for space key press Also internet Explorer, Edge (16 and earlier), and Firefox (36 and earlier) use "Left", "Right", "Up", and "Down" instead of "ArrowLeft", "ArrowRight", "ArrowUp", and "ArrowDown".

ssatguru commented 4 years ago

If running on IE and you need to use the spacebar for jump (or for any other action) use something like var ua = window.navigator.userAgent;
var isIE = /MSIE|Trident/.test(ua); if (isIE) {
//IE specific code goes here
cc.setJumpKey("spacebar");
}

Arrow key have been fixed

ssatguru commented 4 years ago

fixed in v0.4.3