From the course: Cert Prep: Unity Certified Associate Game Developer Scripting with C#

Unlock the full course today

Join today to access over 24,400 courses taught by industry experts.

Reading user input

Reading user input

- Over the previous two movies, we've looked at movement and rotation by creating a mover script and a rotator script. In this movie, we're going to put together those two aspects, both movement and rotation, to create a basic player control script that's going to allow us to use the keyboard controls to move around this buggy object. We can move left and right to rotate the direction of this car, and we can use forward and back to move the object in the direction that it's looking. Now to get started doing this, I'm going to make sure I check over both my mover and rotator script, and make sure that both are deactivated, so we're not using the code that we created previously in the preceding movies. We're going to be controlling the movement and the rotation from a single new script that we're going to create here. To get started, I'm going to move to the project panel. Right click, choose create, and then choose C Sharp…

Contents