Alright, so today I got home quite tired and tomorrow is going to be a long day, so I decided to pick a couple of quick tasks to do.
One thing I noticed when watching people playing the singleplayer was that the Weapon-to-weapon hit wasn’t working as intended. I started poking around the code and made some changes. Before I was using SphereCast, and I think in some occasions the SphereCast was simply returning itself and stopping there, so I replaced it with a SphereCastAll to get all of the colliders found. To make sure I’m not running this all the time several times, I’m only doing this if the speed is greater than 0 and if there is a weapon in range. For the range I’m using squareroot iterating through the weapons list in the GameManager so shouldn’t be too heavy. I also added one extra frame of pause on the impact to make it feel heavier and a particle of sparks flying :D
Talking about too heavy, since I’m using a room system for the singleplayer, and I only see one room at a time, I figured I could quickly and effortlessly hide the rooms the player isn’t at. All I did for that was to hide all the rooms but the initial one when generating them, then when I cross a door I hide the previous room and unhide the new one. That’s saving me A LOT of drawcalls, later on as I finish rooms I should also merge the meshes to save more drawcalls :)
That’s it for today, just some quick fixes/changes.