My journey becoming a Unity game developer: Make a game look beautiful-Creating colliders in the Control Room pt.2

Rhett Haynes
5 min readMar 20, 2022

--

Objective: Adding colliders to the terminals, Test tubes, platform, and stairs in the Control Room. Also, turning the Mesh Renderers off on all the Cube objects used to create colliders in the scene.

Control Room finished with the Mesh Renderers turned off for all Cube objects used as colliders in scene.

To set colliders around the terminals, stairs, test tubes, and platform in the Control Room, let’s turn off the Ceilings, Overhead Struts, Columns, Door Archway, and a Wall on one side of the room. This will help us visually adjust the colliders around any of the objects inside the room if needed.

Walls, ceilings, and columns are turned off to access the other game objects in the room.

First game objects colliders will be added to will be the Test tubes. Select all of the Test tubes, and select Add Component->Box Collider. We will see Box Colliders added to each Test tube selected in the scene.

Second, select all of the main terminals in the room and select Add Component->Box Collider as well. Third, select all of the mini-terminals in the scene and select Add Component->Box Collider to finish off the easier assets to add colliders around.

Box colliders added to the Test tubes.

Next, these game objects require adjusting the colliders around each object ourselves. With the platform chosen as the next game object to add a collider to, create a Cube game object and position it in the middle of the platform. Scale the Cube out to fit around the entire platform including the front part extended out from the platform. Make sure the Cube’s top layer is just above the platform itself for the characters to move on. Remember that the Cube objects automatically come with Box Colliders attached.

Used a Cube object around the platform to create the collider.

Select one side of the platform’s stairs, right-click on the stairs and create a Cube object making this cube a child of these stairs. With the Cube object positioned in front of the bottom step in the middle, rotate the Cube at a 45 degree angle and scale it to lay across the edge of the top step coming down across the steps to the floor. Create another Cube object, position it on top of the top step and scale it across the length of the step. Make sure that both Cube objects edges are aligned evenly to create a smooth edge which will allow any characters to move up and down the stairs without any difficulties.

Used a Cube object rotated across the steps attached to another Cube on the top step.

Using the original Cube objects created for this side of the platform, let’s duplicate them making them a child of the other stairs attached to the platform. With the duplicated stairs Cube object, rotate it around the opposite value along the X-axis to make the Cube face the other direction. Position this Cube object along the other stairs from the top edge step down to the floor. Position the other top step Cube object onto the step attached at the edges of the other Cube.

Duplicated the original stair Cubes and positioned them onto the other platform stairs

We will now organize the game objects starting with the platform. Create an Empty game object name Platform 01, and drag all the floor tiles that make up the platform as well as the Cube collider object into the Platform 01 object making this the parent object.

Create another Empty game object name Terminal Objects from the middle terminal’s position and unparent it when created. Select all of the terminals, support struts, platform, stairs and drag them into Terminal Objects. One last thing is to change the — Static — object’s name to Environment as we want this object to hold all of the game objects making up this scene. Drag Terminal Objects into the Environment object.

Organized all of the terminals, support struts, platform, and stairs into the Terminal Objects game object.

Final thing is to make sure to turn on the Overhead Struts, Columns, Door Archway, and the Wall. To make this scene presentable to play, we need to turn off all of the Cube’s Mesh Renderers used to create colliders in the scene.

Turned the Mesh Renderer off for all game objects with the Cube’s collider on them.

To test out the colliders, we will download and install Unity’s First Person Character Controller. Go to Unity’s web page to download the Starter Assets-First Person Character Controller. Then inside of Unity, go to the Window->Package Manager and import this file into your project.

Installed Unity’s First Person Character Controller.

Play the game and try to go through all objects that should have colliders on them using the player character in the game.

--

--

Rhett Haynes
Rhett Haynes

Written by Rhett Haynes

Learning to become a Unity game developer.

No responses yet