Creating a Physics-Based Character Controller in Unity

With Unity we can manage the player in different ways, we can decide to do everything with the code, or we can take advantage of the components offered by Unity as the rigidbody to manage the physics and work with the code or we can use directly the “Character Controller” that in addition to managing the physics offers us a set of data and methods that allow us to save a lot of time.

Just create a game object, for convenience use the capsule since the character controller will also provide you the collider of a capsule

Once we have added the component, we just have to create a script for the player, access the component, and start managing the movement, the jump, and everything we need.

This component offers a number of methods that I recommend looking at directly in the online scripting API

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Andrea Alicino

Andrea Alicino

Unity developer and C# programmer. Currently looking for games industry employment.