1 decade ago by Mike
Well, as the title says. Whenever I try and bind a letter key (W,A,S,D) for example, it will not work.
If I change it to arrow keys, I can move just fine. But if I switch it to any letter keys, it won't work. (Same goes for every other action, that isn't moving).
Works
Doesn't Work
If I change it to arrow keys, I can move just fine. But if I switch it to any letter keys, it won't work. (Same goes for every other action, that isn't moving).
ig.input.bind( ig.KEY.LEFT_ARROW, 'left' ); ig.input.bind( ig.KEY.RIGHT_ARROW, 'right' );
Works
ig.input.bind( ig.KEY.A, 'left' ); g.input.bind( ig.KEY.D, 'right' );
Doesn't Work
if( ig.input.state('left') ) { this.vel.x = -this.speed; this.flip = true; }else if( ig.input.state('right') ) { this.vel.x = +this.speed; this.flip = false; }else{ this.vel.x = 0; }