Reworked and optimized wet steps and water splashes
Something that really bothered me with the old wet step system was that the steps weren’t really blending with the environment. Let’s say the player has wet feet and he steps on an edge or uneven surface it would instantiate a particle system with a flat bilboarded texture that would fade out over time.
For this reason I had decided decals would be a smart way of blending those wetsteps with the environment. Something else that annoyed me was the instantiating and destroying of Particle Systems with my own “garbage collector”, which wasn’t really performant.
For this reason Object pooling was the right solution. The steps won’t get destroyed, but reused. The cycle would go something like; move a prefab to the position of the feet, set it’s starting color (dark black) and then fade out. This way the steps are constantly reused and aniamted over and over again.
In the meanwhile I figured why not make it so that when the player only has one wet feet only let that feet place wet steps. Before I was using on trigger enter/exit to determine if a player was in a wet area and now I’m using raycasts for each feet to detect wet surfaces.
















