physicsBody property uses the
SKPhysicsBody class object. In the life cycle of a frame, the
didSimulatePhysics function is called just after actions are evaluated. The work of this function is to calculate the physical properties, such as gravity, velocity, friction, restitution, collision, or other forces. After these calculations are done, the positions and orientations of nodes are updated in the
update function. If we are going to apply some force on a node, it is necessary that we assign the
SKPhysicsBody object to that node first.
Sprite Kit provides us with two kinds of physics bodies: