Journal Entry 4: Explosions and Rubble


Date: 13. 9. 2021

Creating explosions has been easier than expected. Once again I found some free assets on kenney.nl, sliced up the spritesheet created an explosion prefab with SpriteRenderer and CircleCollider set to trigger mode. With a little bit of code I made the explosions to grow made them spawn on meteor impact.

Making Rubble, however, was a bit harder. I want the rubble to interact with the ground but act as a trigger with a player. I settled for a solution with two colliders on different layers and set proper interactions in collision matrix. I had some annoyances with setting the collision matrix for 3D instead of 2D physics engine. Finally, I made the rubble shoot out on meteor impact.

I still have some stuff to figure out regarding explosion and rubble. I have to prevent taking damage twice from the same meteor, once from meteor impact itself and from the explosion as well. This is not going to matter when hitting the player, but will matter once I add walls into the game. Regarding rubble, I still have to implement collection by player.

Files

Day3Build.zip 22 MB
Sep 13, 2021

Get Don't Be Afraid To Fall

Leave a comment

Log in with itch.io to leave a comment.