Over the last few days I've spent some time polishing the breakable objects and removing some of the bugs I've found with them. One of my goals was to make the act and sight of the breakables much more satisfying. In addition, a delay to the fragility of the objects has been added. This gives them about a second to fall into place or correct any tiny collision overlaps, like setting a breakable on a surface that it accidentally goes into a bit or placing it just a tiny bit above the surface the asset's intended to be placed on.
You can also see that I've added a rough UI that displays the player's current score as well as a countdown timer for how long they have to break as many objects as possible before time runs out. I decided to go with a countdown timer since part of the premise of the game is that you're a cat who's trying to break as many things as possible before getting caught.
This means that from the moment that you break your first object the timer starts counting down to simulate one of your guardians running to see what happened. Once they get to the area you're in you can no longer break anything. Above, you can see that the "start the timer when the first object breaks" part of the countdown timer's functionality isn't added yet, but it's something I plan to add in the next day or so.
I've also made sure to setup a basic score counter so that I can start rounding out the minimum viable product. Currently, the objects in the gif above are set to award the player 10 points when they break. That's just the default amount, but I've made sure they're easily editable in Unity's inspector. In the above gif I demonstrated this by staggering the impacts of the breakable objects to show the score increasing each time one hits the ground and breaks.
The next steps toward completing this functionality is to add the "start the timer when the first object breaks" functionality and to add some sound to make it more auditorily satisfying, since right now the crash is just silent. There may be more things I add/change later on other than those specific things, but to avoid feature creep and keep the scope manageable I'm trying to look about one or two parts ahead per asset.
In addition to the changes I've made with the breakable objects, I've also started making some changes to the third-person player controller. One of the more major changes is that instead of moving using transform.Translate() it now uses the Rigidbody.AddForce(). I did this to start working on a bug that causes the player to stick walls or objects they collide with while in the air. Other than that I've started greyboxing the cat's paws to allow the player to swipe objects in front of them.
The next thing I did was create two physical materials. One for when the player is on the ground (with normal friction) and one for when they're in the air (with no friction). It's working a little better, but there's still a bug that causes the player to stick to the wall and even sort of climb it if they are continuously moving into the wall, and jumping will let you climb it. So, I've got some things to fix in regards to that. Plus, the turning is currently too fast so I need to start polishing that too.
I started working on a new project recently which required modelling some assets in Blender and making broken versions of the assets using the Cell Fracture add-on. Once the unbroken and broken versions of the models were done I imported them into Unity and programmed them to break based on their falling velocity. The gif above isn't very smooth, to be honest I had to do some editing to get the gif small enough for it to be uploaded here, but it still demonstrates the end result pretty well.
It took some time to work out some of the bugs, although it still needs a bit of polish, like adding some bounciness to the broken fragments to make the break more fun and satisfying, but I was able to figure out how to program it to work the way I wanted. During one of my earlier attempts I ran into a bug where the broken version of the model would become active at the position where the unbroken version started falling. This led me to setting the position of the broken version to be the same as the unbroken version. This allowed the broken version of the asset to become active at the position where the unbroken version had collided with the ground.
My plan is to use these, along with other models, to develop a minimum viable product for the new project. The scripts are designed to be flexible so they can be attached to any object that has a broken and unbroken version of the model which will make it easy to add more assets to the list of breakable objects. Other than the breakables and third-person player controller (which I already made for another project a while ago), I need to add a HUD with some text to keep track of the player's score as well as create a couple scripts to keep track of and add to the player's score. I'm also planning to add a time-based element. Although, I'm still debating between either giving the player a certain amount of time to complete the level, simply keeping track of how long it takes them, or some other time-based element that adds another level of challenge for the players who'd enjoy that.