Overview

We are going to be setting up our player controller. It will allow us to give it a velocity

input that will automatically move our player throughout the world. It will also take into account

grounding the player, making sure they won’t fall for any obstacles.

Press the + button and add a CharacterBody2D node

Rename it to Player

To give our Player a Sprite model, simply drag and image from the FileSystem into the Scene

 Make this sprite a child of the Player node 

and rename it to Sprite.

Ensure that both the Sprite and Player nodes

are centered at 0 , 0

We need to add a collider.

This is the player hitbox.

Right-click on the Player node

and select Add Child Node.

Add a CollisionShape2D and choose the Capsule shape.

Surround the Sprite with the capsule.