
If we don't do this check, jumping won't work right. The character will be made up of the following components:Ī physical body made up of a Capsule Collider and RigidbodyĪ SimpleCharacterController script that takes and responds to inputĪn InputController script or a SimpleCharacterAgent script if you’re using ML-AgentsĬreate a new C# script called SimpleCharacterController.cs and open it.ĭelete the Start() and Update() functions so that you have a clean, empty class.ĬheckGrounded() will check whether the character is on the ground and update the IsGrounded variable. IsGrounded functionality (prevents jumping while airborne, plus is useful for other stuff) Slope limit (prevents jumping up steep slopes) The functionality we’ll make for this character includes:

We will not use the built in Unity CharacterController primarily because we want a character that works with Rigidbody physics.

In this tutorial you’ll learn how to create a very simple character controller for Unity that also works with ML-Agents.
