PARENTING

Parenting is an important concept to understand when working with the Godot Engine. 

It is used to create relationships between nodes, allowing them to inherit properties such as position, rotation and scale. 

Any node that isn’t the root node will be a child of at least one parent.

Player Scene

In our Player Scene, Coin is already a child of the Player.

Let's add another child node.

Right-Click the Player and select Add Child Node.

This time add a CollisionShape2D

We can add a Shape property 

to the CollisionShape2D node, 

we will be using the RectangleShape2D.

This can then be scaled to the size of the player sprite

using the orange circles on the edge of the rectangle

Anything done to the Parent will be done to the Child

If we Scale, Move or Rotate the Player

the Collision box we added will do the same.