Skip to content

Add humanoid animator controller for part 1 - #1518

Open
icantdo wants to merge 3 commits into
RE-SS3D:developfrom
icantdo:develop
Open

icantdo wants to merge 3 commits into
RE-SS3D:developfrom
icantdo:develop

Conversation

@icantdo

@icantdo icantdo commented Jul 25, 2026 •

Copy link
Copy Markdown

[WIP] Animation system part 1 — Humanoid animator, networking, combat & emote integration

Summary

Implements the humanoid animation system requested in #1333. Adds a layered Animator
Controller — base layer for movement/posture (idle/walk/run/limp, crawling, sitting),
an additive Injury layer for one-shot flinch reactions per body region, independent
Hold Left / Hold Right layers for per-arm held-item poses, a data-driven Emote layer
gated by current posture, and an upper-body-masked Action layer so hits and throws
still play while sitting. Also adds the networked HumanoidAnimatorController API,
wires the hit animation into HitInteraction, and includes 6 debug console commands
to exercise each piece independently.

Included:

  • Animator parameters & layers (Movement, Injury, Hold Left, Hold Right, Emote, Action, Limp)
  • HumanoidAnimatorController C# API (posture, limp, hold pose, flinch, emote, throw, hit)
  • Networking: owner-driven parameters via NetworkAnimator, server-authoritative hit
    relay via [Server] + [ObserversRpc]
  • Combat integration (HitInteraction → attacker's swing animation)
  • 6 debug console commands (posture, limp, holdpose, flinch, emote, throwanim)
  • EmoteData ScriptableObject framework, one Wave emote as example

Not included:

  • Real throw interaction (no throw item interaction exists yet — throwanim is a
    debug-only stand-in)
  • Per-leg injury source (SetLegInjury has no caller yet; FeetController only
    exposes one combined health factor today)
  • Ragdoll (left out of scope for this pass)

PR checklist

  • The game builds properly without errors.
  • No unrelated changes are present.
  • No "trash" files are committed.
  • Relevant code is documented.
  • Update the related GitBook document, or create a new one if needed.

Pictures/Videos

image
2026-07-25.10-29-38.1.mp4

Testing

Use the debug console commands to exercise each layer in isolation:

  • posture (stand|sit|prone) — verify base layer transitions
  • limp (amount) — float -1 (left leg hurt) to 1 (right leg hurt), verify limp blend
  • holdpose (left|right) (none|briefcase|drink|underarm|shoulder|waiter) — verify
    independent per-arm hold poses
  • flinch (armleft|armright|legleft|legright|headfront|headback|torsofront|torsoback) —
    verify one-shot additive flinch
  • emote (emote name) — verify emote plays and is correctly gated by posture
  • throwanim (left|right) — verify throw animation in isolation

For combat: land a melee hit in HitInteraction and confirm the swing animation plays
on the attacker for all observers.

Known issue affecting testing: the hit trigger currently does nothing in-game due
to a parameter name mismatch — see Known Issues #1 below. Use throwanim or manual
Animator window testing to verify the Action layer transitions themselves work.

Networking checklist

  • Works from host in host mode.
  • Works from server in server mode.
  • Works on server in client mode.
  • Works and is synchronized across different clients.
  • Is persistent.

Changes

Assets/Scripts/SS3D/Systems/Entities/Humanoid/HumanoidAnimatorController.cs now
derives from NetworkActor instead of Actor, exposing SetPosture, SetLegInjury,
SetHoldPose, TriggerFlinch, TryPlayEmote, TryGetEmote, TriggerThrowLocal
(owner-only) and ServerTriggerHit ([Server]). All parameters are referenced via
Animator.StringToHash constants in Animations.Humanoid rather than string literals.
Supporting types added: Posture, HandSide, HoldPose, FlinchRegion, EmoteData.

Known issues (need fixing before this is fully playable):

  1. Critical: HitTriggerLeft parameter in HumanCharacterAnimator.controller has a
    leading space (" HitTriggerLeft"), so the hashed name from code never matches and
    ServerTriggerHit(HandSide.Left) silently does nothing. Needs renaming in the
    Animator Controller (parameter + transition condition).
  2. 19 .anim clips + .meta files and WaveEmote.asset are sitting directly under
    Assets/ instead of the correct Human folder. The Animator currently references
    them by GUID so functionality isn't broken, but they need moving via the Unity
    Editor (to preserve GUID wiring) and stray duplicates need deleting.
  3. Two clip filenames have casing typos: HumanHItL.anim, HUmanLimpLeft.anim.
  4. SetLegInjury has no caller yet — waiting on per-leg health plumbing.
  5. TriggerThrowLocal has no real gameplay caller yet — only exercised via console
    until a throw interaction exists.

Related issues/PRs

Closes #1333.
Dependency context from #1060, additional relevant discussion in #937.

@icantdo
icantdo deployed to unity_tests August 3, 2026 20:09 — with GitHub Actions Active

This branch was successfully deployed

1 active deployment
unity_tests — 218eab3a Deployed Aug 3, 2026 by icantdo via Run tests #1212
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Animation system part 1

1 participant