Though we already mentioned a few examples of game controls with Rigidbody and Character Controller, in the following recipe, we will code the actual controls for the game character of our prototype. We couldn't do this before we had working platforms in the prototype! In the following recipe, we will make use of the Rigidbody component and its physics features, plus add in a few simple instructions.
Open up your project. We need a new script for this, so create one as usual in the
Scripts folder of your project and name it