Player Movement Controllers

Jeff W. Murray · 2021

The human control script uses Unity’s character controller and is based on the third person character controller provided by Unity as a part of the game engine. This scripts original behavior was to move the player based on the direction of the camera and, here, it has been adapted to work either directionally or based on its own rotation by toggling the move Directionally Boolean variable to true or false. When the speed changes, rather than changing the animation instantly from slow to fast the variable curSmooth is used to transition speed smoothly. Changing the pitch of the engine Audio Source object makes a convincing motor sound.

Read the paper · More papers on PaperTik