Skip to main content

Characters

Characters are the heart of any HELIX experience. Whether you're spawning a player-controlled avatar, a wandering NPC shopkeeper, or a cinematic MetaHuman, the HCharacter class gives you full control over appearance, movement, and behavior.

Spawning a Character

Every player who joins your world needs a character to inhabit. You can spawn one at any location and rotation you like.

// Spawn a character at the world origin and possess it
AHCharacter* MyCharacter = HCharacter::Spawn(FVector(0, 0, 100), FQuat(0, 0, 0, 1), Player);
Player->Possess(MyCharacter->GetPawn());

Animations

Characters support a wide range of animations out of the box. Use PlayAnimation to trigger any animation asset -- from idle gestures to full combat sequences.

// Play a wave animation montage
MyCharacter->PlayAnimation(WaveMontage, 1.0f, "DefaultSlot");

PlayAnimation plays a montage animation on the character. You can specify a play rate and a start section name. Use StopAnimation to stop a playing montage with an optional blend-out time.

Movement

Characters come with built-in movement and physics. You can toggle ragdoll mode, enable or disable player input, and attach objects to skeleton sockets.

// Toggle ragdoll physics
MyCharacter->SetRagdollMode(true);

// Disable player input
MyCharacter->SetInputEnabled(false);

Appearance & MetaHumans

HELIX supports full character customization, including Epic's MetaHuman system. You can swap skeletal meshes, apply materials, and adjust morph targets to create unique looks.

// Change the character mesh
MyCharacter->SetMesh(UObject::Load("/Game/MyMeshes/MyCustomMesh.MyCustomMesh"));

// Attach a static mesh to a socket
MyCharacter->AddStaticMeshAttached("backpack", BackpackMesh, "spine_03");

NPCs

NPCs are characters that aren't possessed by a player. You can give them AI behavior by setting waypoints, using behavior trees, or scripting their actions directly. Since they share the same Character class, everything above -- animations, movement, appearance -- works for NPCs too.

tip

For more complex NPC behavior, look into HELIX's built-in AI navigation system which provides pathfinding, obstacle avoidance, and patrol routes out of the box.