Make a real player move in Unity (in ~5 minutes)
You’re not “learning Unity” today.
You’re going to control a player with input and see it move.
Step 1: Create a new project (1 minute)
Open Unity Hub
Click New Project → 3D (Core)
Name it anything
Click Create
Step 2: Create a simple Player (1 minute)
In the Hierarchy:
Right-click → 3D Object → Capsule
Rename it: Player
With Player selected:
Click Add Component → CharacterController
This gives us clean, stable movement without physics chaos.
Step 3: Add input (1 minute)
With Player selected:
Click Add Component → PlayerInput
In the PlayerInput component:
- Set Behavior to Send Messages
- Click Create Actions
Unity will generate an Input Actions asset. Make sure there is an action named Move set to Vector2 (WASD + Left Stick).
Step 4: Add two tiny scripts (2 minutes)
We’re doing this the professional way:
- Input Reader reads input
- Player Controller moves the CharacterController
4A) Create: PlayerInputReader
Select Player
Click Add Component → New Script
Name it: PlayerInputReader
Replace everything inside with this:
using UnityEngine;
using UnityEngine.InputSystem;
public sealed class PlayerInputReader : MonoBehaviour
{
public Vector2 Move { get; private set; }
// PlayerInput (Send Messages) calls this automatically
// if your action is named "Move"
public void OnMove(InputValue value)
{
Move = value.Get<Vector2>();
}
}
Save the script.
4B) Create: PlayerController
Select Player
Click Add Component → New Script
Name it: PlayerController
Replace everything inside with this:
using UnityEngine;
[RequireComponent(typeof(CharacterController))]
public sealed class PlayerController : MonoBehaviour
{
[SerializeField] private PlayerInputReader input;
[SerializeField] private float moveSpeed = 5f;
private CharacterController controller;
private void Awake()
{
controller = GetComponent<CharacterController>();
if (input == null) input = GetComponent<PlayerInputReader>();
}
private void Update()
{
Vector2 move = input != null ? input.Move : Vector2.zero;
// Simple world-space movement
Vector3 worldMove = new Vector3(move.x, 0f, move.y);
controller.Move(worldMove * moveSpeed * Time.deltaTime);
}
}
Save the script.
Step 5: Press play (10 seconds)
Click Play.
You can now move the Player.
If nothing moves, open your Input Actions asset and confirm that the Move action exists and is set to Vector2.
What just happened (this matters)
You didn’t memorize Unity.
- You created a Player object
- You captured input cleanly
- You moved using CharacterController
- You separated responsibilities into two components
That separation is the difference between:
a project that scales and one that collapses when you add features.
Stop here
Do not keep going.
Do not add jumping.
Do not rewrite it “better.”
Do not open YouTube.
Let this win land. You just built a clean foundation.
Tomorrow: why most beginner projects break right after this, and how to avoid it.
Dan