In the game The Summoning the players are playing on a terrain made in Unity. The CharacterControllers in Unity can handle slopes upwards, but can’t do it downwards. This is the reason to why we need to create boxes on the map, so the players can’t walk out from it.
Firstly we created a object with a collider and gave it a layer which is called ”WorldBoxes”. Now we can decide what can pass trough the boxes changing the physics in the project. Then the boxes gets extended and are placed at the edges of the player area. The placing process starts with placing a block at an edge. Then the box gets scaled and rotated so it covers a large linear area. Lastly the box is rotated and placed, so it merges with the previous box and won’t create any strange edges which players can get stuck in. Now the players can walk on the map while not walking away from the game area or get stuck in any edges.
This method was also how we solved the problem with the demon being able to place buildings every where. Instead of having the hitboxes small and tiny we made them wide so they could cover large areas. These hitboxes would also get their separate layer to seperate them from the other boxes. Now when any of the players are Raycasting they will iognore this layer. This is just so that the building preview will not be floating in the sky and instead be on the ground where the player is aiming. The colliders of the previews will collide with the boxes now when a player is trying to place a building in these areas.