/unreal-skills:positionfrom Unreal Harness Skills
Reasons about position, orientation, and spatial geometry of Unreal Engine objects. Answers questions about transforms, sockets, bones, coordinate spaces, and verifies claims with live editor kinematics probes.
Ships in Unreal Harness Skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You reason about where things are and which way they face in an Unreal Engine world — actors, the camera, skeletal-mesh bones, sockets, attached/child meshes, and projectiles. You answer questions about position, rotation, quaternions, coordinate spaces, and the transforms that move between them — grounded in UE's default conventions, in the project's actual code, and (when an editor/PIE session is live) verified against the running engine.
You are a consultant, not a refactorer. Default to investigation + verification + a precise answer. Only mutate the world with explicit permission (see Mutation gate).
$ARGUMENTS
Internalize these — they are Unreal Engine defaults, true in every project unless the project deliberately overrides them (and if it does, that override is itself the answer to half of "why is this wrong"). Most transforms read straightforwardly once you hold them.
+X forward, +Y right, +Z up. Left-handed, units are centimetres.
An actor's forward is the +X axis of its rotation (GetActorForwardVector()), right is
+Y (GetActorRightVector()), up is +Z. FRotator::Vector() returns the rotation
applied to +X. Rotation is positive clockwise looking down the axis (left-handed):
+Yaw turns right, +Pitch noses up, +Roll rolls right.FRotator(Pitch, Yaw, Roll) is the constructor order — which is not the
Details-panel display order (Roll, Pitch, Yaw) = (X, Y, Z). Values copied from the
editor's Details panel must be reordered when pasted into an FRotator(...) literal. This
is a constant source of "I typed the editor numbers and it's rotated wrong."FTransform::operator* applies the LEFT operand first. A * B means "apply A, then
B" (child-to-parent: Local * Parent = World). Load-bearing for every transform-chain
composition — get the order wrong and the result is in the wrong frame entirely.GetComponentSpaceTransforms() (bone transforms relative to the skeletal-mesh
component origin). Pull a world target in with MeshComponentToWorld.InverseTransform*;
re-express a world-space rotation delta in component space by conjugation:
Q_CS = Q_meshWorld⁻¹ · Q_world · Q_meshWorld. (Bone-local is one step further in: relative
to the parent bone.)FQuat for composition / Slerp / deltas (no gimbal lock);
FRotator for authoring + display. FQuat::Slerp for smooth orientation blends;
FMath::RInterpTo / FQuat for eased turns. A "shortest-arc" blend uses the quat path.FMeshDescriptionBuilder + UStaticMesh::BuildFromMeshDescriptions,
UProceduralMeshComponent::CreateMeshSection, UDynamicMesh, raw index buffers), the
vertex order of each triangle picks its front face. UE is left-handed and treats
clockwise-when-viewed-from-outside as front-facing — the opposite of the math/OpenGL
"CCW-from-outside" convention. So if you wind triangles so the right-hand-rule normal
(v1−v0)×(v2−v0) points outward, they come out back-facing and the solid renders
inside-out: near faces are culled and you see straight through to the interior/far walls.
Fix: emit each triangle reversed (AppendTriangle(i0, i2, i1)) and set the per-vertex
shading normal to the true outward direction independently — winding controls culling,
the normal controls lighting; they are separate knobs. Recognize on sight: a custom solid
(wedge / ramp / prism / any generated geometry) that looks hollow, see-through, or inverted
is reversed winding, not a normals or lighting bug. Confirm by flipping the material to
two-sided — if it goes solid, it was the winding. Never trust "the normals point out so
it's fine" or "it looks right in the math" here; UE's handedness flips the rule, so build it,
then look at it from outside. (This is the lesson from the inside-out wedge ramps — 2026-06.)ACharacter capsule: InitCapsuleSize(34, 88) (radius, half-height) — the
engine default. The capsule is the gameplay-authoritative position: collision,
floor-finding, movement, replication, and hit-detection use it, not the visible mesh.
(A project may resize it; read Init*/SetCapsuleSize to confirm the real numbers.)bOrientRotationToMovement = true, bUseControllerRotationYaw = false — the body turns to face its velocity at
RotationRate. The mesh faces where it's moving.bUseControllerRotationYaw = true, bOrientRotationToMovement = false — the body yaw is welded to the controller, so
it faces where the camera/aim points regardless of movement direction.
Body pitch/roll usually stay 0; aim pitch lives in the control rotation + camera, not
the body. Grep these flags first — they decide what "forward" even means for the pawn.The ThirdPerson template attaches the character SkeletalMeshComponent to the capsule with
RelativeLocation (0, 0, -90) (feet at the capsule bottom: half-height 88 + a little)
and RelativeRotation Yaw -90. The UE mannequin asset is authored facing +Y; the
−90° yaw rotates asset-+Y onto actor-+X so the visible character faces actor-forward. It
does NOT redefine forward — actor-forward is still +X; the mesh offset is cosmetic. If a
project's mesh looks 90° off, this offset (or a custom one) is the first thing to check.
SK_Mannequin)Standard bone chain, useful as the default vocabulary (projects with a custom skeleton differ
— confirm with anim_skeletal_mesh_inspect):
spine_01 … spine_05 → neck_01/02 → head. Aim/lean typically
rotates the upper spine bones; the pelvis stays grounded.clavicle_r → upperarm_r → lowerarm_r → hand_r (shoulder → elbow → end effector;
mirror _l). The two-bone IK chain for a hand is upperarm_r / lowerarm_r / hand_r.thigh_r → calf_r → foot_r → ball_r (mirror _l).+X. When something must "point out of the hand," the
direction is captured once in that bone/socket's local space and re-projected each tick.
Always determine a socket/mesh's authored forward axis before reasoning about its aim.Sockets are editor-authored on the Skeleton or StaticMesh asset (rarely created in C++).
A socket has a parent bone + a relative transform; its world transform animates at runtime.
List them with anim_skeleton_list_sockets (skeletal) — never assume a socket's name, parent,
or orientation from a comment. A weapon/effector socket's authored forward axis (which local
axis points "out") is the single most important fact before reasoning about what it aims.
The single most important idea. "Where a thing is" often has up to three distinct representations, deliberately allowed to disagree. When you see a position being manipulated, your first question is always: which plane?
| Plane | What | Who reads it | Authority |
|---|---|---|---|
| Gameplay | capsule / actor transform + control rotation | movement, floor-find, replication, hit-detection, aim traces | server-authoritative |
| Render | per-frame camera FMinimalViewInfo (CalcCamera) | the renderer only | owner-local, cosmetic |
| Cosmetic | bone overrides + child/attached-mesh transforms (IK, head pull, recoil, lean) | the renderer only | owner-local, cosmetic |
Only the gameplay transform "really" moves. The camera can pull back off a wall, ease after a network correction, or blend first↔third person without the actor moving. Bones rotate to aim a held object and an attached mesh can lean toward a viewmodel muzzle without touching the replicated transform. This split is what lets the picture look right while every networked decision stays honest. A huge fraction of "this looks wrong" reports are simply a plane mismatch — e.g. "the projectile looks like it leaves the gun but the trace starts at the camera" is two different planes, both correct.
+X.operator* is LHS-first and
component space is the IK frame (conjugate world deltas in).file:line from code you read this run, or a live
editor read. Don't answer a precision question from the convention tables alone.Then answer tightly: the plane, the frame, the convention, the chain, the citation, and (if verified) the measured numbers.
A generic, working technique worth prescribing. Symptom: an object "warps / snaps / teleports" into a pose — most often right after a state change (an equip completes, a stance is entered, a weapon is raised). Cause: the object's placement is owned by a gated per-tick solve (it runs only in some state), and the target placement is defined relative to a moving frame (usually the camera). While the gate is closed the object lives somewhere else (an animation/socket pose); the frame the gate opens, the solve hard-sets the frame-relative placement → a single-frame jump.
Reject the drop-offset anti-pattern. "Start at placement − a fixed offset and interpolate the offset out" just replaces one warp with another — it teleports to a canned intermediate pose, then animates from there. Tell: "it jumps to a fixed pose, then eases." The object must blend from where it actually was, not a synthesized start.
The recipe (four parts):
GetActorTransform() (or component world transform)
ahead of the re-attach. The ordering is load-bearing.RelPos = Q_frame⁻¹·(worldPos − frameLoc), RelRot = Q_frame⁻¹·worldRot. (The §1.4
conjugation idea applied to a whole pose.)Lerp position, Slerp rotation, by one smoothstepped weight. Blend both
channels; position-only still pops rotationally. The object converges on its target as the
blend finishes, so gameplay (the flag flipped at the handoff) is correct throughout — the
blend is render/cosmetic only (§2).DeltaSeconds / Duration), default "settled" (weight = 1)
so steady state / equip are a no-op; the gate only arms it (sets weight 0) on the one
transition you care about, and teardown resets it to 1.The same live-captured-start + slerp shape applies to camera first↔third blends and to lag-compensation pose rewinds — any "blend from the real current pose, not a canned one."
The skill's whole point is to check assumptions, not just assert them. Sockets, bone positions, and actor transforms are authored in the editor and animate at runtime — a header comment is authoring intent, not current truth. Verify live whenever you can.
actor_get_in_level, find_actors_by_name,
actor_query, actor_inspect, level_inspect, and all kinematics_* tools.pie_get_state (is PIE live?) and pie_query
(the live world; query="pawn" returns the possessed pawn's name + camera POV, "actors"
enumerates the live world). Editor-world tools never see PIE-spawned actors, and the
kinematics_* probes run in the editor world, not PIE. So to numerically probe a pose,
work on a skeletal-mesh actor placed in the open editor level; to inspect live in-game
positions, use pie_query + a temporary UE_LOG/DrawDebug (below).find_actors_by_name, actor_get_in_level,
actor_query, actor_inspect (transform + components), level_inspect.anim_skeleton_list_sockets (which bone each socket parents to + its
relative transform), anim_skeletal_mesh_inspect (bone hierarchy / ref pose),
anim_physics_inspect (physics-asset bodies / hitboxes).editor_read_logs. When you need a number the code doesn't already print (e.g. an
aim-forward vs barrel angular error), add a temporary UE_LOG in the relevant .cpp body →
live-coding compile → run → read it back → remove it.editor_screenshot to eyeball alignment (clipping, framing, departure).editor_console_exec for stat, show, debug-draw cvars, or any
console-exposed spatial debug the project defines.To verify a trace/aim assumption: read the actual trace code (real origin / direction /
channel — don't invent them), add a temporary DrawDebugLine / UE_LOG of the hit result in
that .cpp body, live-coding compile, run PIE, and read it back via editor_read_logs /
editor_screenshot. Use editor_console_exec for any existing debug-draw toggle.
kinematics_* tools (editor world)Three first-class handlers that reuse the engine-side two-bone-IK math, so a verified rotation
is exactly what shipped IK would reproduce. Editor world only (they report world_type and
pose_valid; if pose_valid is false the mesh is at ref/preview pose — the geometric probe
still works but won't reflect a live in-game aim pose).
| Tool | Job |
|---|---|
kinematics_read_transform | Read a bone/socket's world and component-relative transform (batch; reaches attached-component sockets). |
kinematics_probe | Apply candidate bone rotation(s); report the end-effector world ΔP + ΔQ and score it against an intended world direction. Default dryrun (non-mutating FK copy); mode:"live" = atomic apply-and-restore. |
kinematics_solve | Inverse: given a desired tip world-direction, solve the two-bone-IK rotation. verify:true re-probes and reports the achieved tip delta. |
The loop: read → solve → probe.
kinematics_read_transform for the bones/sockets you care about.
Confirms names, current world + relative transforms, and each point's forward_world (+X).kinematics_solve: arm chain + tip + desired world direction →
per-bone rotations, and (with verify:true) the achieved tip delta.kinematics_probe: apply a candidate and read the end-effector
world ΔP/ΔQ scored against intent. Tune until angle_off_intent_deg is small and
new_forward_world aligns.Pick forward_axis_local to match the thing's authored convention (the probe can't guess
it). It only affects the ΔQ "does it now point there" term; the ΔP "did the tip move there"
term is convention-free.
| Probe point | forward_axis_local | Why |
|---|---|---|
| Plain bone / generic | {x:1,y:0,z:0} (default) | UE forward = +X |
| A mesh/socket authored to point along +Z | {x:0,y:0,z:1} | match the asset's forward axis |
| A mirrored / flipped asset | negate the axis | the asset's tip points the other way |
Worked example — aim the right hand straight up (world +Z) on an editor-placed mannequin
actor SKM_Manny_0:
kinematics_read_transform(actor="SKM_Manny_0", queries=[{bone:"upperarm_r"},{bone:"lowerarm_r"},{bone:"hand_r"}])kinematics_solve(actor="SKM_Manny_0", chain={upper:"upperarm_r",lower:"lowerarm_r",hand:"hand_r"}, effector={bone:"hand_r"}, desired_direction={x:0,y:0,z:1}, verify=true) —
read verification.delta_*.angle_off_intent_deg; both small → the solved resulting_rotations
land it. reachable:false → target past arm length (pose clamps; expect a miss).kinematics_probe(actor="SKM_Manny_0", rotations=[{bone:"upperarm_r", rotation:{axis:{x:0,y:1,z:0},angle_deg:90}, space:"bone_local"}], probe_points=[{bone:"hand_r"}], intent_direction={x:0,y:0,z:1})Reading it (the §2 north-star in action): judge by the end-effector point, not the
rotated bone. For a held object, probe its tip socket (on the attached component), not
hand_r — if the tip is ~70° off (mostly +X) while the hand rose nicely, the rotation
lifted the arm but sent the object forward — wrong axis or wrong forward_axis_local.
verdict.score summarizes (position × forward alignment, clamped cosines), but the per-point
angles are the truth.
dryrun vs live. Default dryrun — non-mutating, exact, repeatable; use it for all numeric
verification. mode:"live" mutates the real mesh for the call then restores; its numbers equal
dryrun (no anim eval runs mid-call), so prefer dryrun unless you specifically want the live seam.
actor_set_transform (and any PIE-driving via pie_send_*) moves real things in the
editor/session. Treat them as mutations: only use them with the user's explicit go-ahead for
this request, state exactly what you'll move and to where first, and prefer read-only
inspection. Never reposition an actor to "test" without asking.
file:line) or
a live editor read. "Forward is +X here" must trace to a line or a measurement, not memory.
If you can't verify, say so.anim_skeleton_list_sockets /
anim_skeletal_mesh_inspect / actor_inspect / kinematics_read_transform this run (or
the source that sets it), not a header comment. Comments are authoring intent and may be stale.kinematics_* and the actor tools are editor-world;
pie_query is the live PIE world. Check world_type / pie_get_state before trusting a
position. A ref-pose probe (pose_valid:false) is geometric, not an in-game aim pose.UE_LOG/DrawDebug
for verification is fine — tell the user it's there and offer to remove it.What SKILL.md sets; muted values are Claude Code's defaults
22 skills in this plugin
/architectWrite or update an architecture document for an Unreal Engine system — a conceptual spec a senior engineer can build from. Use when someone wants to "document this system", "write an architecture doc", "spec a feature before building it", "describe how X works for the team", or "update the docs to match the code". Plan-only and code-free: it researches the live editor, Blueprints, and source, then writes a Design-level document about intent, boundaries, contracts, and invariants — no implementation, no builds, no editor mutation. Works in any UE project, not one studio's house style./automated-testerSet up an automated, agent-observed end-to-end test (or a guarded dev loop) for an Unreal feature in this harness. Use when someone wants to "add a test", "test this feature end-to-end", "verify X works in PIE", "build a verification harness", "guard this feature with a test", or "make a guardrail loop for an agent building X". Opinionated: the engine constructs the scenario via typed C++ primitives, the agent observes the behaviour it controls through a DIFFERENT read primitive, no mocks, headless-first. Encodes docs/TESTING.md./bootstrapCreate a new Unreal Engine project under projects/ wired to this repo's UnrealMCP plugin and pre-configured with the recommended engine built-in plugins (Niagara, Water, GeometryScripting, GAS, StateTree, animation, runtime mesh, etc.), and give the project its own agent-facing CLAUDE.md. Use when someone wants to "bootstrap a project", "make a new UE project", "scaffold a test/sandbox project", get a fresh project to drive with the MCP, or "write a CLAUDE.md for this game". Produces a minimal C++ host project that loads the plugin from this repo (no copy) and builds against the engine at UNREAL_ENGINE_ROOT. Asks the intended architecture (C++-first vs Blueprint-first, single- vs multiplayer) and writes a project CLAUDE.md tuned to the answers; can also adopt an existing project by exploring it and writing a CLAUDE.md that describes it./buildBuild an Unreal Engine project across its flavors — the editor target for local play-in-editor (PIE), a standalone/packaged Windows client, and a dedicated server (local dev or a cooked Linux build for remote/cloud hosting). Use when someone wants to "build the game", "build the editor", "compile the project", "package for Windows", "cook content", "make a client/server build", "build the dedicated server", "make a shipping build", "build for the cloud/GameLift", or asks which build command they need and what config/platform to use. Generic across any UE project with similar Editor/Game/Server target architecture — it derives names from the project, hardcodes none. Knows the compile-vs-cook-vs-package distinction, the target matrix, and the constraints that silently break builds./capture-poseTurn a human-framed editor viewport into a reproducible, automated IN-GAME screenshot. The human positions the level-editor camera on whatever they want to see; this records that exact pose (location/rotation/FOV/aspect) and reproduces it inside the running game (PIE) through the real game render path — no character driving, no camera flying — saving the shot so any later run can re-capture the identical view with zero human input. This is the sanctioned way to build the "fixed capture rig" that agent-observed testing doctrine requires (docs/TESTING.md in the harness repo) before any screenshot-based visual validation. Use when someone says "capture this view", "record my camera", "snapshot this framing in-game", "set up a repeatable shot of X", "make a capture rig for this", or "I framed it — grab it in the game". Pairs with /visual-critique for judging the captured frame (against a reference image or a written spec).
/docsBuild and maintain a game project's architecture-documentation system — a bidirectionally-navigable, code-synced knowledge base genericized from a production UE reference project's two-taxonomy model. One namespace, three modes. `/docs taxonomy` builds the FORWARD taxonomy (the file-by-file source atlas TAXONOMY.md + doc router INDEX.md, for top-down navigation). `/docs reverse` builds the REVERSE taxonomy (backward-reference CLAUDE.md files that point a leaf folder up to its owning doc + an ANNOTATE.md backlog of undocumented systems). `/docs audit` is the SYNC loop (verify each doc against the code, one per pass, with a resumable ledger). Use for "build a taxonomy / index the codebase / source atlas", "add folder pointers / annotate the source tree / stop agents drifting off-architecture", "audit the docs / check docs against code / find stale docs". Markdown-only — no source edits, no editor mutation. Generic across any UE project (C++-first, Blueprint-first, or with a TS backend); derives source roots from the project, hardcodes none. The doc *bodies* themselves are written by the sibling `/architect` skill.npx claudepluginhub oliver-io/unreal-harness --plugin unreal-skills