Creating A 2.5D Character Controller In Unity

Today I’m creating a custom player controller which will handle movement, gravity and jumping.

Vincent Taylor
Jan 20, 2022

Today’s Objective: Create a custom character controller to handle movement, gravity and jumping.

The Code:

In a new script I’ve called “PlayerController”, I create the movement variables which will control how the player can move:

Then add the functionality:

Get startup references
Calculate player velocity
Apply player velocity
Leave-ground/touch-ground event methods

A simple player controller which I will be expanding on in future posts.

--

--

Vincent Taylor

Unity game developer / C# Programmer / Gamer. Australian (Tasmanian) indie games developer for 10+ years. Currently looking for games industry employment.