Skip to content
HELIX is in Early Access Preview. Some features and documentation may be non-functional or out of date.

HCharacter

HCharacter spawns a customizable player character into the world with support for animation, mesh overrides, ragdoll physics, and attachments. It is designed for gameplay characters that need full control over visuals, input, skeletal sockets, and interactions. This class is ideal for roleplay systems, test bots, or any scenario where you need a fully controllable humanoid character

Tip

HCharacter is an Actor so it inherits all functions from Actor

Constructor#

Example
local char = HCharacter(Vector(0,0,100), Quat(0,0,0,1), player)
player:Possess(char:GetPawn())
Name Type Default Description
location Vector (0,100,100) Spawn position
rotation Quat (0,0,0,1) Spawn orientation
player APlayerController Required Player controller to possess the character
collision_type string "Pawn" Collision profile
gravity_enabled boolean true Whether gravity is applied to the pawn
max_health number 100 Character's starting health
death_sound SoundCue nil Optional death sound
pain_sound SoundCue nil Optional hurt sound

Functions#

PlayAnimation#

Plays a montage animation on the character.

char:PlayAnimation(MyMontage, 1.0, "StartSection")


StopAnimation#

Stops an active montage with an optional blend-out.

char:StopAnimation(0.25, MyMontage)


AddStaticMeshAttached#

Attaches a static mesh to a bone/socket on the character.

char:AddStaticMeshAttached("bag", BagMesh, "spine_03")


RemoveStaticMeshAttached#

Removes a previously attached mesh by ID.

char:RemoveStaticMeshAttached("bag")


RemoveAllStaticMeshesAttached#

Removes all attached meshes from the character.

char:RemoveAllStaticMeshesAttached()


SetInputEnabled#

Enables or disables player input for movement and look.

char:SetInputEnabled(false)


SetRagdollMode#

Toggles ragdoll physics on or off.

char:SetRagdollMode(true)


SetMesh#

Overrides the character’s skeletal mesh.

char:SetMesh(UE.UObject.Load("/Game/MyMeshes/MyCustomMesh.MyCustomMesh"))


GetPawn#

Returns the underlying ACharacter actor.

local pawn = char:GetPawn()


GetPlayer#

Returns the controlling APlayerController.

local pc = char:GetPlayer()


GetTeam#

Returns the team value assigned to the character.

local t = char:GetTeam()


GetMesh#

Returns the name of the currently assigned skeletal mesh.

print(char:GetMesh())


GetBoneTransform#

Returns a FTransform for a bone name (e.g., "hand_r").

local transform = char:GetBoneTransform("spine_03")


IsInRagdollMode#

Returns true if ragdoll physics are currently active.

if char:IsInRagdollMode() then ...


IsInputEnabled#

Returns whether input is currently enabled.

print(char:IsInputEnabled())