- Home /
Dynamic terrain (Safeground)
In my (multiplayer) game the player can walk on a safe ground, and can fall into lava. Right now the way I made this is simply just use a circle brush and made some ground, with lava all around it. On this safe ground, there is just an invisible circle trigger collider. When the player enters this collider, it means the player is not in lava, and when it's out, the player enters lava:
void OnTriggerEnter(Collider col)
{
if(col.tag == "Safezone")
{
if (!isLocalPlayer)
return;
CmdSetInLava(false);
}
}
This works but I want to make the map more dynamic. For example, I want the safe ground to be smaller over time. I kind of want the same thing that happens in this video: https://youtu.be/v2uOGQegj2c?t=3m55s . You will see the map gets smaller at 4:00.
Can someone point me in the right direction on how to achieve such a thing? Thanks in advance!
Comment