I'm trying to use WASD as movement keys instead of the arrow keys. My code is below. Arrow keys are working perfectly but i"m not getting any response from WASD. Any suggestions?
def update if button_down? Gosu::KbLeft or button_down? Gosu::KbA then @player.turn_left end if button_down? Gosu::KbRight or button_down? Gosu::KbD then @player.turn_right end if button_down? Gosu::KbUp or button_down? Gosu::KbW then @player.accelerate end @player.move end
It never fails, right? As soon as I make an account and try to post for help, I realize the human error. I was editing a copy of the file and not the one I was running through the console.