Manipulating game objects in Unity

Rhett Haynes
4 min readMay 31, 2022

Objective: Learning to use the tools Unity provides to manipulate game objects. Also, changing the Game screen color to better indicate that the game mode is active.

Whether we need to maneuver around objects for a better view, adjust objects size, place objects from one location to another, or create primitive objects for prototyping Unity provides us with tools to do these things quickly and efficiently.

Let’s create a 3D object in the Hierarchy by clicking on the “+” sign, and selecting 3D Object->Cube in our Scene. The 1st tool we will use is the Hand tool which allows us to move the camera around the object in the scene to show us the view we desire. The 2nd tool is the Move tool which will move the object around the scene from one location to another which is ideal for constructing an environment in our scene.

Changing the view around the cube with the View tool. Moving the cube with the Move tool.

The 3rd tool we have is the Rotate tool which allows us to move the object around 360 degrees along the X, Y, and Z axes to change the object’s position in the camera’s view. The 4th tool is the Scale tool which will change the width, height, and depth along the 3 axes. The 5th tool we can use is the Rect tool which allows us to Move and Scale an object at the same time.

Used the Rotate, Scale, and Rect tool on the cube.

The 6th tool we have is the Transform tool which allows us to Move, Rotate, and Scale an object at the same time for faster results. The 7th and final tool is the Edit Bounding Volume tool which allows us in this situation to adjust the object’s collider bounds around the object.

Using the Transform tool, and Edit Bounding Volume on the cube.

In this demonstration, we added a Sphere object with a Rigidbody plus gravity turned on to collide with the Player object. Notice that we can adjust the bounds of the collider around the Player, and the Sphere is still being held up from falling all the way down.

Editing the Bounding Volume around the cube to show collider in action.

With the Sphere object deleted we will focus back on the Player object. Normally in video games the Main Camera will be a distance away from the Player for a better viewing experience. Select the Main Camera, and set the Transform’s Z-axis to -10 as this is considered the standard position for the camera.

Main Camera shown in Scene -10 units behind the cube object.

To add color to the Player, let’s create a Material through the Project folder and name it Player_mat. With the Material you can use either a texture or in this case color to change the appearance of the object using Shaders. With the Material selected, we will use the Standard shader, click on the Albedo channel and change the color of the Player to red.

The color red added to the cube through a Material created.

Sometimes we change our layout when working on a game or application to our comfort level.

Using a personal layout to work on a game.

However, there is a professional layout that is best practice to use when working which has the Scene View above the Game View. To the right will be the Hierarchy and below it will be the Project folder. Finally, on the far right will be the Inspector which will allow for easier transfer of objects, audio, game art, animation controllers into slots that need these objects to work through the Inspector.

Using a professional layout to work on a game.

Another thing we can do is change the Tint Color when the game is in play mode. Go to Edit->Preferences->Colors->Playmode Tint and change it to a color that will let you know that the game is in play mode so if you decide to make changes, you will see that you need to stop play to make changes that you want to be permanent.

Changed the PlayMode Tint for when the game is in play mode.

One last thing we want to do is delete the objects in the Scene except for the Main Camera and Directional Light. Also, delete the materials from the Materials folder and delete the Sample Scene from the Scenes folder.

Now create a new scene from File->New Scene and select 3D once more since this game will be 2.5D. Then either press CTRL+S to save or use Save As to save this scene in the Scenes folder.

Removed SampleScene and replaced it with the new Game scene.

--

--