Snow Boarder Game Design

So, after the lesson “Using FindObjectOfType” and putting in all the code I was able to get my boost working with the up arrow, but now my left and right arrows don’t work. And I went over the code a few times but I’m not sure what I could be. I would appreciate ant help I can get for this!


Hi Sean,

Welcome to our community! :slight_smile:

First of all, add Debug.Logs to your code to see if the relevant code blocks get executed as expected. ‘Not working in the game’ does not necessarily corresponds with ‘not working in the code’.

Since there is no restriction in the Update method, both methods in that code block get executed, and the if/else condition in both methods get evaluated. At least, that’s the theory. Never assume that it does work. Always check that. Otherwise, you might end up wasting a lot of time looking for the problem in the wrong place.

If other keys stop getting registered while the up arrow key is pressed down, there is a chance that you are experiencing a hardware problem. Try to press those keys on this website to see what happens:

Privacy & Terms