G—P / FMX 320 / Semester / Week 11

Week 11 · Phase 3 — Interactivity

Blueprints I: input, and a character you can drive Project 3 launch

Your character can already walk and run — but only because you press play on an Animation Blueprint you wired by hand. Today gameplay takes the wheel. You'll build a real Character Blueprint, read a controller with Enhanced Input, move a body through space with the Character Movement Component, and feed that movement back into the Anim BP so the Blend Space you built responds to an actual player. This is where animation becomes interactivity.

Sessions Mon Nov 09 & Wed Nov 11 · 2:00 – 3:50 pm · CCB-134 Bring your animated character plus the Animation Blueprint from Project 2
By the end of this session you can

Mon 2:00 · Brief The engine calls you

You don't run your game — the engine does, and it calls your logic on a schedule. Learn that schedule and Blueprint scripting stops feeling like magic.

Blueprints and the game loop

A Blueprint is a visual script you attach to an Actor — nodes and wires instead of typed code. You never call its events yourself; the engine fires them for you at defined moments. Event BeginPlay runs once as the Actor comes to life. Then, every single frame, Unreal fires Event Tick — sixty-plus times a second — which is where you read input and make things happen. This is the game loop: read input, update state, render, repeat, forever, until someone quits.

The key mental shift from a render pipeline is that nothing is pre-baked. There is no Sequencer scrubbing to a known end. Each frame you get a tiny slice of time and you decide what the world looks like at the end of it. Your job in the graph is to answer, every frame: given what the player just did, what changes?

Tick vs. events, and why Delta Seconds matters

Event Tick is the per-frame pulse — great for reading input and driving animation. But frames don't arrive on a fixed clock; a heavy scene runs slower than a light one. So anything that should happen at a steady real-world rate gets multiplied by Delta Seconds, the Delta Seconds pin on Event Tick that reports the time elapsed since the last frame. Move by speed × Delta Seconds and your character crosses the room in the same wall-clock time on a fast or slow machine. Forget it and your game literally runs faster on better hardware.

Not everything is per-frame. Events are the engine calling you when something specific occurs — an On Component Begin Overlap when a collider overlaps, a hit event on a physics contact, a UMG button's click. Tick is "check every frame"; events are "tell me when." Good interactive logic uses both: Tick for continuous things like movement, events for discrete moments like picking something up. We lean hard on events next week.

Reading input the modern way

Unreal reads input through Enhanced Input, the current standard. Instead of hard-coding key checks, you author an Input Action (an abstract intent like "Move," typed as an Axis2D) and bind physical keys and stick axes to it in an Input Mapping Context — one abstraction across keyboard, gamepad, and touch that survives rebinding. In your Character Blueprint you add the mapping context on Event BeginPlay, then handle the Move action to get a Vector2 each frame and turn it into motion. Here is the smallest honest version of today's logic, described as the node graph you'll wire:

The Blueprint node graph (BP_PlayerCharacter)
Event BeginPlay → Get Controller → Get Enhanced Input Local Player Subsystem → Add Mapping Context (IMC_Player).

IA_Move (triggered) → the action's Action Value pin gives a Vector2 (X = right/left, Y = forward/back) → Add Movement Input for the forward vector scaled by Y, and again for the right vector scaled by X. The Character Movement Component consumes that input, applies acceleration and collision, and moves the Character. No Delta Seconds math needed here — Add Movement Input is already frame-rate independent.

Event Tick → Get Velocity → Vector Length → Set Speed (a float variable on the Animation Blueprint). That one wire is the whole payoff: the movement you just computed becomes the parameter your Project 2 Blend Space already reads.

Read it node by node. Set Speed on the Anim BP is the connection that matters: push the stick further, the Character moves faster, Speed climbs, and the walk blends to a run — no new animation work, just a wire from gameplay to the Animation Blueprint you built. If you want a taste of C++, the advanced path is the same idea in a ACharacter subclass: bind the action in SetupPlayerInputComponent, call AddMovementInput, and set the anim variable — the Blueprint is doing exactly this under the hood.

State of the Art · Agents write game code now

AI coding agents are genuinely good at wiring Blueprints and C++ — controllers, state machines, editor plumbing — and, through the first-party Unreal MCP built into UE 5.8, they can act inside the editor directly: create Blueprints, add nodes, set variables. They're also genuinely capable of confident nonsense. The studios adopting them fastest are also inventing the review process to catch AI errors before they ship. Discussion: what does code review look like when your teammate is a model that can edit your project?

Blueprints · Enhanced Input · Claude Code docs · Unreal MCP

Mon 2:45 · Guided lab A character you can drive

We build the graph above together, from empty Blueprint to a character that walks and runs on your input. Do the steps in order — the Anim BP wire only works once movement exists.

  1. Enable Enhanced Input

    Enhanced Input is on by default in UE 5.8. Confirm it under Edit → Project Settings → Input, where the default input classes are the Enhanced Input ones. This is the modern input path; everything we wire today assumes it.

  2. Start from a Character Blueprint

    Create a Blueprint Class based on Character (BP_PlayerCharacter) and drop your Project 2 skeletal mesh into its Mesh component. A Character already ships with a capsule collider and a Character Movement Component — code-driven movement with collision, gravity, and grounding, exactly right for a player, without you wiring physics by hand.

  3. Author the Input Action and Mapping Context

    Create an Input Action IA_Move (Value Type: Axis2D) and an Input Mapping Context IMC_Player. In the context, bind WASD and the left stick to IA_Move with the right modifiers (Swizzle / Negate) so up is +Y and right is +X. This is the intent-to-keys layer.

  4. Add the mapping context on BeginPlay

    In BP_PlayerCharacter, on Event BeginPlay, get the player's Enhanced Input Local Player Subsystem and call Add Mapping Context with IMC_Player. Without this step the action never fires — a classic first-day gotcha.

  5. Read input and move

    Add the IA_Move event node, split its Action Value into X and Y, and call Add Movement Input with the control-rotation forward vector (× Y) and right vector (× X). Save, hit Play In Editor — you should slide around the floor with clean collision.

  6. Wire movement into the Animation Blueprint

    On Event Tick, get the Character's Velocity, take its length, and Set the Speed float on the Anim BP (or set it inside Event Blueprint Update Animation by reading the owning pawn's velocity). The variable name must match the float your Project 2 Blend Space reads. Now standing still holds idle and moving blends up through walk to run.

  7. Face the direction of travel

    On the Character Movement Component, enable Orient Rotation to Movement and disable Use Controller Rotation Yaw. The movement component now smoothly turns the Character toward its velocity for free. A character that walks sideways reads as broken; turning to face motion is the cheapest believability you'll ever buy.

  8. Test, then back up

    Play and confirm: idle when still, walk at low input, run at full, and a clean turn. Then zip a dated copy of the project. This Character is the spine of Project 3 — get it backed up.

Wed 2:00 · Agent lab An agent wires your player — then you own it

You just built a Character by hand, so you know exactly what one should look like. Now make an agent build one and hold it to your standard.

Prompt 1 · Agent-built player from a spec
In this UE 5.8 project, using the Unreal MCP, create a BP_PlayerCharacter based on Character. Requirements: add a Mapping Context on BeginPlay, read WASD/left-stick movement through an Enhanced Input Axis2D action, drive the Character Movement Component with Add Movement Input, orient rotation to movement, and set an Animation Blueprint float named "Speed" from the Character's velocity so my existing walk/run Blend Space drives itself. Add an editable MaxWalkSpeed. Explain each node graph as you build it.

When it finishes, open the Blueprint and read every node. Then change one behavior yourself — add a sprint on shift, a different turn rate, whatever — by hand, not by asking the agent. At crit you must be able to explain every node, including the one you changed and why.

Prompt 2 · Make it check the API first
Before you wire any input, look up the current Enhanced Input workflow in the Unreal docs and tell me the exact node names and classes you'll use — Input Action, Input Mapping Context, Add Mapping Context, the subsystem. Flag anything you're unsure about instead of guessing, then build the graph.

Blueprint node names and the Enhanced Input workflow have shifted across engine versions, and this is precisely where agents invent plausible-looking nodes that don't exist. Note in your AILOG.md where the agent guessed, where it looked something up, and whether asking it to verify first actually reduced the nonsense.

Before you call it done

Wed 3:10 · Crit / share Drive it on the projector

Each person plugs in and drives their character on the big screen — idle, walk, run, a turn — then opens the Character Blueprint and walks the room through two or three nodes, including the behavior they changed themselves. We're listening for genuine understanding, not clean graphs: if you can explain why Delta Seconds exists and what Set Speed is talking to, you own the Blueprint. We close by opening the Project 3 (Interactive Vertical Slice) brief on /fmx320/#projects and scoping it together — a small, real, playable moment, not a whole game.

Homework — due before Week 11

TaskDeliverable
Polish your player character: tune speed, turn rate, and blend thresholds until it feels good.A finished BP_PlayerCharacter plus a short clip of it driving in Play In Editor.
Read the Project 3 brief and write a one-paragraph scope for your vertical slice.A project3-scope.md saved in your project folder.
Read the Blueprints overview and the Enhanced Input quick-start.Two questions or observations added to your AILOG.md.

Resources