CUSTOM CAMERA
CUSTOM CAMERA
We will set up a camera node in order to make our game more dynamic.
We will set up a camera node in order to make our game more dynamic.
We will be able to zoom in and out, move the camera around, and customize it.
We will be able to zoom in and out, move the camera around, and customize it.
Add a Camera2D node as a child of Player
Add a Camera2D node as a child of Player
Children move with their parents
Children move with their parents
So the camera will follow the Player
So the camera will follow the Player
Experiment with the Zoom level to see the effect.
Experiment with the Zoom level to see the effect.
Because the Camera is following the player
Because the Camera is following the player
It now seems that the player is not moving
It now seems that the player is not moving
We will add coins to collect so that we can see the player moving around.
We will add coins to collect so that we can see the player moving around.