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 摘要。