Exploring physics simulation mechanics
Let's take a closer look at the specifics of SpriteKit's physics system. For instance, why are the bees subject to gravity while the ground stays where it is? Though we attached physics bodies to both nodes, we actually used two different styles of physics bodies. There are three types of physics bodies, and each behaves slightly differently:
- Dynamic: Physics bodies have volume and are fully subject to forces and collisions in the system. We will use dynamic physics bodies for most parts of the game world: the player, enemies, power-ups, and others.
- Static: Physics bodies have volume but no velocity. The physics simulation does not move nodes with static bodies, but they can still collide with other game objects. ...