Problem with Movement of Driver

On this lecture (15), everything was going along smoothly until I got to the line of code

float steerAmount = Input.GetAxis(“Horizontal”) ;

Now my driver only goes straight up and off the screen. I double-checked all my code and it looks exactly like Rick’s. I don’t know why I can’t get it to move any other direction now.

I also get this error down at the bottom of my screen: Assets\Scenes\Driver.cs(7,28): warning CS0414: The field ‘Driver.steerSpeed’ is assigned but its value is never used

Never mind. I figured it out. I forgot that I needed to move the driver by using the keys on the keyboard rather than adjusting in the inspector. After adding the vertical code in and using the keys instead, it works just fine now.

Good job on fixing the problem, Penny, and thanks for sharing your solution! :slight_smile:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms