In order to finish implementing our shooting system, the last thing we need to do is to create our bullets. At this stage, it shouldn't be a too complicated.
Shooting with passion
Creating a bullet prefab
First, we need to drag and drop our projectile sprite that we sliced in the previous chapter into the scene. Then, we need to add a Box Collider 2D, and the default settings should be good to go. We also need to enable Is Trigger, like we did for the cakes in the previous project:
Then, since our bullet will move, we also need to add a Rigidbody 2D, and we just need to change the Gravity Scale to 0 and freeze the rotation around Z; exactly as we did for the player:
Finally, by using the Add Component button, we can...