Add a Script to the CharacterBody2D node of the Player
Enable the Basic Movement Template when creating the script
The default movement script is shown below
Clean up the code to make it readable and manageable
Do this by moving things into their own functions
Call these functions in the process function
The function implementations are shown below
This script will enable basic character movement
ENABLE COLLISIONS WITH THE GROUND AND PASS THROUGH LAYERS!
On the Collision Property of the CharacterBody2D
Turn ON Collision Mask layers 2 and 3
This is so that the Player on Collision Layer 1
is looking for collisions on Layers 2 and 3
These are Ground and Pass_through Layers
The Player can now collide with the Ground and Pass_through layers!
Remember to rename layers to help you:
Go to Project --> Project Settings --> Layer Names --> 2D Physics
Drag and Drop it into Level_1
Test that the Player can move around the level.
One-Way collision setting on the pass-through tiles we can jump UP THROUGH the platforms.