Unreal Engine: Actors, Blueprints and C++
Port Harbour Hopper to Unreal Engine, type in the numbers from this course unchanged, and the drone crawls while dropped crates drift down like feathers. Nothing is broken. Unreal measures in different units and points "up" along a different axis, and once you know its conventions, the rest of the course carries straight over.
The rule
Actors tick every frame in a z-up world measured in centimetres.
An Actor is anything placed in a level: the drone, a boat, a crate, a light. Actors are built from components, such as a static mesh that gives the crate its shape. A Pawn is an Actor that a player or an AI can control.
You write gameplay in C++, in Blueprints — Unreal's visual scripting, where logic is a graph of connected nodes — or in both. A common pattern is a C++ base class with Blueprint children that designers can tweak.
Each frame, Unreal calls the Tick function of every Actor that has ticking switched on, passing that frame's delta time in seconds:
void ABoat::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
// 300 units per second = 3 metres per second
AddActorWorldOffset(FVector(300.f * DeltaTime, 0.f, 0.f));
}The conventions to learn:
- Units: 1 unit is 1 centimetre, so default gravity is −980 units/s².
- Axes: z points up, x points forward and y points right.
- Maths types:
FVectorfor vectors,FRotatorfor Euler angles (pitch, yaw and roll, in degrees),FQuatfor quaternions andFTransformfor the full scale, rotate and translate transform.
Unreal's physics system, Chaos, simulates rigid bodies for you, and a physical material sets their friction and restitution.
The shortcut
Metres × 100, and up is z. Convert every number you bring in, then map the ideas: loop → Tick; vector → FVector; Euler angles → FRotator; quaternion → FQuat; affine transform → FTransform.
Height
The crate drops from 12 m: 1200 units.
The trap is pasting metre values in unchanged. A drone speed typed as 6 moves at 6 centimetres per second.
Drills
Answer fast — trust the rule.
Harbour Hopper's drone flies at 6 m/s. What speed do you type in Unreal units per second?
Which axis points up in Unreal's world?
What are Blueprints?
FRotator stores pitch, yaw and roll in degrees. Which idea from this course is it?
In Tick(float DeltaTime), what is DeltaTime?
Remember
- Actors are built from components; gameplay goes in C++, Blueprints or both.
Tick(DeltaTime)runs every frame, with the seconds since the last one.- Metres × 100 and up is z;
FVector,FRotator,FQuatandFTransformmap onto this course.
