The obstacle will consist of two parts. There will be an image of an axe that we will rotate around and a base image that the axe will rotate around. The reason we will be controlling the rotation of the axe instead of using another animation is that it would be more complicated to scale Box Collider 2D on the object to always fit the rotating bounds of the axe. Perform the following steps:
Assetsfolder, right-click on it, select Create and then Folder.
Obstacleand open this folder.
Obstaclefolder and click on Import New Asset….
Artfiles for the book and open the
Obstacle_Axe.pngand click on