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.
- Blueprint
- Lua
- JavaScript
// 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());
-- Spawn a character at the world origin and possess it
local my_char = HCharacter(Vector(0, 0, 100), Quat(0, 0, 0, 1), player)
player:Possess(my_char:GetPawn())
// Spawn a character at the world origin and possess it
const myChar = new HCharacter(new Vector(0, 0, 100), new Quat(0, 0, 0, 1), player);
player.Possess(myChar.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.
- Blueprint
- Lua
- JavaScript
// Play a wave animation montage
MyCharacter->PlayAnimation(WaveMontage, 1.0f, "DefaultSlot");
-- Play a wave animation montage
my_char:PlayAnimation(WaveMontage, 1.0, "DefaultSlot")
// Play a wave animation montage
myChar.PlayAnimation(WaveMontage, 1.0, "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.
- Blueprint
- Lua
- JavaScript
// Toggle ragdoll physics
MyCharacter->SetRagdollMode(true);
// Disable player input
MyCharacter->SetInputEnabled(false);
-- Toggle ragdoll physics
my_char:SetRagdollMode(true)
-- Disable player input
my_char:SetInputEnabled(false)
// Toggle ragdoll physics
myChar.SetRagdollMode(true);
// Disable player input
myChar.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.
- Blueprint
- Lua
- JavaScript
// 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");
-- Change the character mesh
my_char:SetMesh(UE.UObject.Load("/Game/MyMeshes/MyCustomMesh.MyCustomMesh"))
-- Attach a static mesh to a socket
my_char:AddStaticMeshAttached("backpack", BackpackMesh, "spine_03")
// Change the character mesh
myChar.SetMesh(UE.UObject.Load("/Game/MyMeshes/MyCustomMesh.MyCustomMesh"));
// Attach a static mesh to a socket
myChar.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.
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.