This week I finally added Gage’s new bear trap models. When the bear trap has been placed, it appears as a “bed” of green spikes in the ground. When a player walks over it, vines spring up around them and trap them for 20 seconds or until they’re freed by another player. I implemented the trap with a collider that only generates overlap events, so the vines don’t have any collision and can’t protect players from being killed by rocks.
I also added atmospheric particles that change color based on what biome they’re in. It was pretty easy to get the basic effect working because I have a material function that blends between up to eight colors based on which biome a fragment is in. However, this means particles would abruptly switch colors when crossing between biomes and it didn’t look very good. First I played around with smoothing out the transition but it was still pretty noticeable. Then I had the idea to fade out particles when they’re in between two or more biomes so that it looked like a new particle was spawning instead of changing colors. This effect worked even better when I plugged in the particle world position instead of the fragment world position, so that every part of the particle would get the same opacity.