Skip to content

Death player animation system (combo / charged / dash timing + rig fixes) - #153

Open
Polo2411 wants to merge 8 commits into
mainfrom
feature/player-animations
Open

Death player animation system (combo / charged / dash timing + rig fixes)#153
Polo2411 wants to merge 8 commits into
mainfrom
feature/player-animations

Conversation

@Polo2411

@Polo2411 Polo2411 commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

🎬 Death — Player Animation System

Animation‑driven ability timing for Death, fully tunable from the inspector, plus the rig/prefab fixes needed to get him animating in‑engine.


✨ What this PR adds

A per‑character animation‑control layer so every Death ability decides — from the inspectorwhich clip plays, its speed, its blend, when the damage lands, and when it recovers — instead of hardcoded timers.

  • 🧩 New CharacterAnimations component + animation‑driven timing in AbilityBase.
  • ♻️ Built so Lyriel reuses the exact same system later.

Implemented behaviour

Ability What it does now
Basic combo Alternates clips (Atk1 → Atk2 → Atk1 …). Damage lands at a configurable Action % of the clip — not on button press.
Charged attack Windup scrubs forward as you charge, auto‑fires at max charge, and on release continues from the charge point (no restart). The charging circle UI now correlates with the animation.
Dash Animation synced to the dash duration.
Hurt No longer replays every frame on continuous (Bound separation) damage — only on discrete hits.
Recovery Cancels on move/dash (responsive); plays when you stop after attacking.
Combo spam Fixed a soft‑lock that froze Death when mashing the basic attack.

🧪 How to test

Important

Recompile GameScripts.dll in Visual Studio first — the C++ scripts changed.

  • Recompile the DLL in Visual Studio
  • Open scene Level1_death_animationsPlay
  • Try Death: move · Dash (L1) · basic combo (R1) · charged (RT hold → release)

🧍 Death prefab

Death.prefab is ready to drop into any scene: fixed skeleton (_end bones), the Visual wrapper node, and both animation components pre‑configured with the Death_* states.

Warning

Scenes that already contain an inline / baked Death won't auto‑update from the prefab. Re‑instantiate Death from the prefab in those scenes.


⚠️ Known issues & pending animation work

Most of these need the animator, not code — they're why the animations aren't 100% yet.

🚨 1. Dash is bugged (root motion)

The dash clip moves Death forward by itself (root motion), and the dash is also moved by code → the two stack up and it clips / looks bad. The clip is also long (1.458 s) for how fast a dash is (dash was 0.15 s; I temporarily raised it to 0.5 s just so it's visible).

Warning

Needed: an in‑place dash clip — same gesture (it looks great!) but the character must not travel forward (like the walk cycle). The engine has no root‑motion extraction, so this cannot be fixed in code.

🌀 2. Charged attack should be circular

It should be a Darius‑Q style spin around himself — right now the clip lunges forward.
(Death's default attack clip already does a circle and could be reused.)

🗣️ 3. Missing clips — Taunt & Shadow Execution

No animations exist yet. (Taunt is now a forward shout, not a pull.) They may move Death wherever fits, as long as he returns to the original position naturally — the abilities themselves don't move him.

🔁 4. Basic recover doesn't fit → currently disabled

There's no recover for the 2nd attack, so the Atk2 → recover transition looks wrong; the recover is left empty for now. Atk1's recover is cleaner.
Needed: a recover that ties in after the 2nd hit.

📏 5. Rig scale / orientation

The model arrived at scale 100 / Z‑up; worked around with a Visual node (scale 0.01, +90° X).
Ideal: re‑export at scale 1, Y‑up, in‑place so the workaround can be removed.

Note

Don't change the rig itself — the skin is already bound in‑game.


🔧 Under the hood (rig / asset fixes)
  • Added the missing _end skeleton bones so the skin binds (it was T‑posing).
  • Added a Visual wrapper node on Death (scale 0.01, +90° X) to correct the scale‑100 / Z‑up export.
  • Synced Ghost_StateMachine clip UIDs to the re‑imported gltf.
  • Death.prefab fully configuredPlayerAnimationController + CharacterAnimations with all Death_* states.

📦 Not in this PR (future)

  • Lyriel animations (same system, when clips arrive).
  • Replicating the Death setup to Game/Assets (Release build).

Polo2411 and others added 8 commits July 13, 2026 22:21
The new Death rig's skin references 88 joints but the prefab skeleton had
only 69; the 21 missing _end tip bones (zero weight) caused the engine's
all-or-nothing skin binding to resolve 0 joints. Added them under their
parents with identity transform.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Animation-driven ability timing via CharacterAnimations + AbilityBase:
- Basic combo alternates clips (1-2-1-2), damage lands at Action %
- Charged attack scrubs the windup with charge progress, auto-fires at
  max charge, resumes the swing on release (no replay)
- Dash animation synced to dash duration; hurt anim skipped for
  continuous (Bound) damage; recovery cancels on move/dash
- Robust attack window (no soft-lock on rapid input)

Death rig setup (workarounds for a 100x / Z-up export):
- Added missing _end skeleton bones so the skin binds (fix T-pose)
- Visual wrapper node (scale 0.01, +90deg X) on prefab + test scene
- Synced Ghost_StateMachine clip UIDs to the re-imported gltf
- Death.prefab configured with PlayerAnimationController + CharacterAnimations

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@JorxPi

JorxPi commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Already commented you privately but it looks really great.

The only thing i don't like is the charged attack animation and behaviour when not fully charged, the lock of the character is too big and the animation too slow, just need to adjust that and the rest are good.

Not sure if we should accept it yet or wait until we have the full correct animations, but it's good for me!

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.

2 participants