Level Design: Colliders for Game Objects in Scene!
Objective: Create colliders for the room!
Hello everyone, this tutorial is a going to show how to quickly set up colliders for your environment. I am going to set this up using primitives mostly. To begin, create a cube and drag it to the middle of your floor.
Stretch the cube on the floor to cover the entire floor area.
Once the floor is nice and covered, we do the same for the walls.
We don’t need to worry too much about actual size, remember these colliders are there to stop the player from walking through these objects.
If we look closely, you’ll notice that I overlooked something. Can you guess what it is?
It will be hard to the player to walk through this archway. Simple fix, shrink the wall collider down and put one on each side of the archway.
Now that we have all the walls covered and the floor, we can safely turn off the mesh renderer for these colliders.
This way the colliders are there to stop the player, and the player won't be able to see them. Next, we need to add colliders to the columns. Open the prefab and add a box collider to the parent object and side it to fit the entire column.
Doing the columns this way will automatically add a collider to the rest of your columns. From here you should be able to finish adding colliders to the rest of your level.
Sometimes it’s easy to over look a collider. Don’t panic, a simple way to test your environment is to add your player and simple explore your own level. This way you can tell what works and what doesn’t. I’ll see you in the next tutorial!