Lesson 3: Transforms and Coordinates - Positioning and Movement

In Lessons 1 and 2 you got comfortable with the Unity interface, GameObjects, and Components. Now it is time to really understand where things are in your world and how to move them with intention.

By the end of this lesson you will:

  • Understand the difference between world space and local space.
  • Use the Transform component to position, rotate, and scale objects precisely.
  • Move objects smoothly using both the editor and C# code.
  • Avoid common mistakes that cause objects to jump, drift, or rotate strangely.

1. World space vs local space

Every object in Unity lives in a coordinate system:

  • World space describes positions relative to the global origin (0, 0, 0).
  • Local space describes positions relative to a parent object.

When an object has no parent, its local transform is effectively world space. When it has a parent, its local position is offset from the parent’s transform.

Practical implications:

  • Moving a parent moves all children, because their local positions are relative.
  • Rotating a parent rotates children around the parent’s origin.
  • Scaling a parent scales children with it.

Keep this mental model in your head whenever you structure a scene hierarchy.

2. Working with the Transform gizmos

Unity’s gizmos in the Scene view give you direct control over transforms.

  • Move (W): Arrows for X (red), Y (green), Z (blue).
  • Rotate (E): Colored arcs for each axis.
  • Scale (R): Cubes on each axis and a central box for uniform scale.

You can toggle between:

  • Global: Manipulate using world axes.
  • Local: Manipulate using the object’s own rotated axes.

Try this:

  • Select an object in your scene.
  • Switch between Global and Local in the toolbar.
  • Rotate the object, then move it again and notice how local axes follow the rotation.

This small habit—checking whether you are in Global or Local mode—prevents a lot of confusion.

3. Positioning objects precisely

Sometimes dragging handles is enough; other times you want exact numbers.

In the Transform component:

  • Use whole numbers (e.g. 0, 1, 2) for grid-aligned layouts.
  • Use decimal values for finer control (e.g. 0.25 for half units).

A practical workflow:

  • Rough in your placement using the gizmo.
  • Fine-tune values in the Inspector for clean numbers.
  • Use Reset on the Transform (gear icon) when you need to zero out a child object’s local transform.

For level design, consider enabling snap:

  • Hold Ctrl/Cmd while dragging to snap movement and rotation.
  • Adjust snap settings under Edit → Snap Settings.

4. Moving objects with C

Transforms are not just for the editor—you will use them constantly in scripts.

Common operations include:

  • Translation: changing transform.position over time.
  • Rotation: using transform.Rotate or assigning transform.rotation.
  • Direction vectors: using transform.forward, transform.right, and transform.up.

Key ideas:

  • Multiply movement by Time.deltaTime so it stays frame rate independent.
  • Use input to build a direction vector, then move in that direction.
  • Think in terms of the player’s local axes when you want movement relative to where they are facing.

5. Understanding pivot points

The pivot (origin) of a GameObject determines:

  • Where it rotates around.
  • Where it scales from.
  • How its local position is interpreted.

Poorly placed pivots cause:

  • Objects spinning around a corner instead of their center.
  • Scaling that stretches from one side instead of uniformly.

When you import models or create sprites:

  • Set the pivot intentionally (center for most props, feet for characters, etc.).
  • For complex setups, use a parent GameObject as a clean pivot and put the visual model as a child.

This makes later scripting and animation a lot easier.

6. Typical movement patterns you will use

Here are the conceptual patterns you will apply throughout the course:

  • Character movement: Combine input axes into a direction vector, transform it into world space, and apply it to transform.position.
  • Camera follow: Smoothly interpolate the camera’s position toward a target transform, often with an offset and damping factor.
  • Orbit controls: Rotate the camera around a pivot by adjusting angles and then converting them back to a position with Quaternion or trigonometry.

You will implement these in code in later scripting-focused lessons. For now, focus on understanding what the Transform is doing when you see objects move in the editor.

7. Mini challenge – build a small layout

To lock this in, create a simple scene layout:

  • A ground plane at position (0, 0, 0).
  • Three platforms placed at different positions and heights.
  • One “start” marker object (e.g. a cube) positioned where the player will spawn.

Constraints:

  • Use clean, readable positions (e.g. integer or half-unit values).
  • Use parenting for anything that should move together (for example, a platform with props on top).
  • Switch between Global and Local modes as you move and rotate things.

When you are done, orbit around the scene and think about which coordinates are world space and which are local to parents.

Troubleshooting

Objects jump when I parent them
When you drag an object under a new parent, its local coordinates change to preserve the world position. If the parent has scale or rotation applied, that can make the child appear to jump. A safe pattern is to keep parents at identity transforms (position 0, rotation 0, scale 1) whenever possible.

My object rotates strangely around a corner
Check the pivot placement. If the pivot is off-center, rotations will appear to orbit that point. You can wrap the object in an empty parent and use that parent as the main transform for movement and rotation.

Movement feels inconsistent between machines
Always multiply movement by Time.deltaTime in scripts so it is independent of frame rate. This keeps gameplay consistent across different hardware.

Summary

In this lesson you learned:

  • How world and local space work together in Unity scenes.
  • Why Transform is the core of positioning, rotation, and scale.
  • How to use gizmos, snapping, and the Inspector to place objects precisely.
  • Why pivot points and parenting matter for movement and rotation.

You now have the mental model needed to reason about where everything is in your game. The next scripting-focused lessons will build on this by turning that understanding into actual movement and camera control systems.

What is next

In Lesson 4: C# Scripting Fundamentals you will write your first gameplay scripts that move objects using the concepts from this lesson. You will translate input into motion, work with vectors, and see how code and transforms fit together in real projects.