Fall damage and jump/fall animations for the hero (VR and Flat)

未關閉
#499 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 2 天內回覆

還沒有人認領這個 Issue。

評估

難度
5/5
預估耗時
一週以上
新手友好度
38/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
csharp, unity
領域
game-dev

研究方向

Start by reading NpcJumpFall.ApplyFallDamage and the GlobalEventDispatcher.FallDamage path mentioned in the issue, then trace how the hero's rig or character controller detects leaving and landing on the ground in VR and Flat. The work also needs to cover health updates through NpcService.SetAttribute, water, god mode, teleports, and the listed VR body animations. Done means matching the specified fall damage and jump/fall behavior for the hero in both modes.

由索引模型根據 Issue 內容生成。

描述

In Gothic, gravity hurts the hero too. A fall deeper than the guild's FALLDOWN_HEIGHT costs FALLDOWN_DAMAGE HP per meter, minus the armor's PROT_FALL (Species.d). A deep fall kills.

Today only NPCs take fall damage (NpcJumpFall.ApplyFallDamage, which raises GlobalEventDispatcher.FallDamage). The player can jump or walk off any cliff without losing HP.

Wanted: fall damage

  • The hero uses the same engine rule. The fall height is measured from the moment the rig / character controller leaves the ground until it lands, in VR and in Flat.
  • HP changes through NpcService.SetAttribute (so hit numbers and bars update). A deep fall kills the hero, like in the engine.
  • No fall damage for water landings (swimming), Marvin's god mode (cheat god), or teleports and scripts that move the hero.

Wanted: jump and fall animations (VR hero body)

  • Jumping plays Gothic's jump. When standing: T_STAND_2_JUMP, then S_JUMP in the air, then T_JUMP_2_STAND on landing. When running: T_RUNL_2_JUMP, then S_JUMP, then T_JUMP_2_RUNL.
  • Falling starts with S_FALLDN and switches to S_FALL when the fall gets deep, the same rule as NpcJumpFall. The landing plays the fall's end (T_FALLDN_2_STAND, or T_FALL_2_FALLEN and stand up after a deep fall).

Found while play-testing the wave 2 stack.

主要語言
C#
星號
33
分支
1
平均合併
1 天 23 小時
30 天內合併 PR
57

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

Gothic-Unity-Project/Gothic-Unity 的其他 Issue

查看 Gothic-Unity-Project/Gothic-Unity 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。