Set up the Player.
Set up the Player.
Use a node called CharacterBody2D.
Use a node called CharacterBody2D.
This node has functionality built in, such as
This node has functionality built in, such as
physics and the ability to detect collisions.
physics and the ability to detect collisions.
Add a Sprite node as a child
Add a Sprite node as a child
Use the Player.png as the texture
Use the Player.png as the texture
Rename the CharacterBody2D to Player
Rename the CharacterBody2D to Player
Rename the Sprite2D to Sprite
Rename the Sprite2D to Sprite
Add a CollisionShape2D as child of Player
Add a CollisionShape2D as child of Player
Add a rectangle shape to it.
Add a rectangle shape to it.
Cover the Player with the HitBox
Cover the Player with the HitBox