Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
4303fd8
feat: the hero takes Gothic's fall damage at the landing - measured f…
BoroBongo Nov 29, 2026
d2b05e4
feat: the VR hero jumps and falls for the scripts (BS_JUMP, BS_FALL) …
BoroBongo Nov 29, 2026
340291e
feat: the VR hero body jumps and falls like Gothic's hero - take-off,…
BoroBongo Nov 29, 2026
a1e143a
feat: after a deep fall the VR hero lands lying and gets up - the vie…
BoroBongo Nov 29, 2026
5b379c3
fix: dropping through a bridge that is still loading after a world lo…
BoroBongo Nov 29, 2026
c0a3383
docs: decision record for the hero's jumps, falls and fall damage
BoroBongo Nov 29, 2026
03b5dc3
fix: a normal VR jump lifts the hero 1 m - the prefab's XRI jump heig…
BoroBongo Nov 29, 2026
4696bcf
feat: deeper than 2 m the hero falls flat and lands lying - on his fa…
BoroBongo Nov 29, 2026
505f680
docs: the jump/fall decision record - falling flat from 2 m, on the f…
BoroBongo Nov 29, 2026
ef3fdcc
chore: meta files of the jump/fall scripts (generated by Unity on imp…
BoroBongo Nov 29, 2026
ea2af83
fix: a jump that lands up to 2 m below its take-off lands on his feet…
BoroBongo Nov 29, 2026
3d12886
feat: a jump at running speed is Gothic's running jump - a long leap …
BoroBongo Nov 29, 2026
dd81be1
docs: the jump/fall decision record - a jump's lying depth counts fro…
BoroBongo Nov 29, 2026
2c2ae61
fix: the hero can't jump while his walking is blocked (lying after a …
BoroBongo Nov 29, 2026
49ceb2e
fix: the hands no longer flicker in fast falls - the physical hand fo…
BoroBongo Nov 29, 2026
2680741
fix: standing and walking the hero jumps up (T_STAND_2_JUMPUP, S_JUMP…
BoroBongo Nov 29, 2026
8799ec8
fix: a jump lands on his feet unless it drops deeper than FALLDOWN_HE…
BoroBongo Nov 29, 2026
26a0cd6
docs: the jump/fall decision record - the jump-up and take-offs at th…
BoroBongo Nov 29, 2026
5163c8f
fix: fall damage only when the hero lands lying on his face or back -…
BoroBongo Nov 29, 2026
7166b7a
refactor: the hero's movement body states in one place (BodyStateExte…
BoroBongo Nov 29, 2026
f76ec98
fix: why the hero's falls aren't tracked is an enum (HeroFallHold), n…
BoroBongo Nov 29, 2026
5c4a562
fix: a drop past the lying depth in one step lands lying too - the la…
BoroBongo Nov 29, 2026
f916b6c
fix: a lying landing's movement lock also ends on a teleport and on t…
BoroBongo Nov 29, 2026
7b028bc
refactor: fall damage is switched where it is raised - NpcJumpFall ch…
BoroBongo Nov 29, 2026
66ea64f
fix: a blocked walk blocks jumping in VRContextInteractionService (an…
BoroBongo Nov 29, 2026
d89ece8
refactor: the normal jump's 1 m rise is a VR tunable (VRConstants.Her…
BoroBongo Nov 29, 2026
df013b3
docs: the jump/fall decision record follows the code - a body state c…
BoroBongo Nov 29, 2026
cf21dbf
chore: meta files of BodyStateExtension and HeroFallHold (generated b…
BoroBongo Nov 29, 2026
a657f02
refactor: the hero always takes fall damage - DeveloperConfig.EnableH…
BoroBongo Nov 29, 2026
cd8985b
refactor: HeroFallPose is FallPose - a HUMANS.MDS property, not the h…
BoroBongo Nov 29, 2026
773243f
refactor: the smallest drop that falls is the platform's ground snap …
BoroBongo Nov 29, 2026
12ae8e8
refactor: Core decides the running jump (HeroAirborneDomain.IsRunning…
BoroBongo Nov 29, 2026
2a35109
refactor: VrHeroLocomotion hears the landing from HeroLanded (listeni…
BoroBongo Nov 29, 2026
1288a46
refactor: the lying landing's timeline has one owner - HeroFallServic…
BoroBongo Nov 29, 2026
a60039a
chore: EnableHeroFallDamage out of Production.asset - the flag is gon…
BoroBongo Nov 29, 2026
57c2bd7
chore: meta file of VrHeroDownAnimations (generated by Unity on import)
BoroBongo Nov 29, 2026
da03be8
feat: texts of the Immersion option "Deep fall view" (heroLandingView…
BoroBongo Nov 29, 2026
7303f23
refactor: one measurement for the running jump - Core keeps the take-…
BoroBongo Nov 29, 2026
2bdf4d2
refactor: the upright fall's names (S_FALLDN, T_FALLDN_2_STAND) next …
BoroBongo Nov 29, 2026
99f05ee
fix: a teleport during a lying landing (also a ledge or ladder exit) …
BoroBongo Nov 29, 2026
2f667fa
style: the VrPhysicsHand snap-distance tooltip and the heroLandingVie…
BoroBongo Nov 29, 2026
e1ee8b7
Merge fix/hero-speed-matches-steps into feature/hero-jump-fall - the …
BoroBongo Nov 29, 2026
1f01390
Merge branch 'fix/hero-speed-matches-steps' into feature/hero-jump-fall
BoroBongo Nov 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Assets/Gothic-Core/Localizations/Gothic-UI Shared Data.asset
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,18 @@ MonoBehaviour:
m_Key: vr.help.ring.text
m_Metadata:
m_Items: []
- m_Id: 199062989374627840
m_Key: menuitem.heroLandingView.label
m_Metadata:
m_Items: []
- m_Id: 199062989416570880
m_Key: menuitem.heroLandingView.value
m_Metadata:
m_Items: []
- m_Id: 199062989416570881
m_Key: menuitem.heroLandingView.description
m_Metadata:
m_Items: []
m_Metadata:
m_Items: []
m_KeyGenerator:
Expand Down
13 changes: 13 additions & 0 deletions Assets/Gothic-Core/Localizations/Gothic-UI_cs.asset
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,19 @@ MonoBehaviour:
m_Localized: "s t\u011Blem|prolnut\xED"
m_Metadata:
m_Items: []
- m_Id: 199062989374627840
m_Localized: "Pohled po p\xE1du"
m_Metadata:
m_Items: []
- m_Id: 199062989416570880
m_Localized: "stranou|s t\u011Blem"
m_Metadata:
m_Items: []
- m_Id: 199062989416570881
m_Localized: "Po hlubok\xE9m p\xE1du hrdina le\u017E\xED a vst\xE1v\xE1: pohled
z\u016Fstane stranou (nekles\xE1) nebo klesne a vstane s t\u011Blem"
m_Metadata:
m_Items: []
references:
version: 2
RefIds: []
13 changes: 13 additions & 0 deletions Assets/Gothic-Core/Localizations/Gothic-UI_de.asset
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,19 @@ MonoBehaviour:
\"Favoriten-Ring\"."
m_Metadata:
m_Items: []
- m_Id: 199062989374627840
m_Localized: Sicht nach Sturz
m_Metadata:
m_Items: []
- m_Id: 199062989416570880
m_Localized: "daneben|mit K\xF6rper"
m_Metadata:
m_Items: []
- m_Id: 199062989416570881
m_Localized: "Nach einem tiefen Sturz liegt der Held und steht auf: die Sicht
bleibt daneben (sie sinkt nicht) oder geht mit dem K\xF6rper runter und hoch"
m_Metadata:
m_Items: []
references:
version: 2
RefIds: []
13 changes: 13 additions & 0 deletions Assets/Gothic-Core/Localizations/Gothic-UI_en.asset
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,19 @@ MonoBehaviour:
it off in Immersion: "Favorites ring".'
m_Metadata:
m_Items: []
- m_Id: 199062989374627840
m_Localized: Deep Fall View
m_Metadata:
m_Items: []
- m_Id: 199062989416570880
m_Localized: aside|with body
m_Metadata:
m_Items: []
- m_Id: 199062989416570881
m_Localized: 'After a deep fall the hero lies down and gets up: the view stays
aside (it doesn''t go down) or goes down and up with the body'
m_Metadata:
m_Items: []
references:
version: 2
RefIds: []
13 changes: 13 additions & 0 deletions Assets/Gothic-Core/Localizations/Gothic-UI_es.asset
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,19 @@ MonoBehaviour:
m_Localized: con el cuerpo|fundido
m_Metadata:
m_Items: []
- m_Id: 199062989374627840
m_Localized: "Vista tras ca\xEDda"
m_Metadata:
m_Items: []
- m_Id: 199062989416570880
m_Localized: a un lado|con el cuerpo
m_Metadata:
m_Items: []
- m_Id: 199062989416570881
m_Localized: "Tras una ca\xEDda profunda el h\xE9roe queda tendido y se levanta:
la vista se queda a un lado (no baja) o baja y sube con el cuerpo"
m_Metadata:
m_Items: []
references:
version: 2
RefIds: []
14 changes: 14 additions & 0 deletions Assets/Gothic-Core/Localizations/Gothic-UI_fr.asset
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,20 @@ MonoBehaviour:
m_Localized: avec le corps|fondu
m_Metadata:
m_Items: []
- m_Id: 199062989374627840
m_Localized: "Vue apr\xE8s chute"
m_Metadata:
m_Items: []
- m_Id: 199062989416570880
m_Localized: "\xE0 c\xF4t\xE9|avec le corps"
m_Metadata:
m_Items: []
- m_Id: 199062989416570881
m_Localized: "Apr\xE8s une chute profonde le h\xE9ros reste \xE0 terre et se
rel\xE8ve : la vue reste \xE0 c\xF4t\xE9 (elle ne descend pas) ou descend et
remonte avec le corps"
m_Metadata:
m_Items: []
references:
version: 2
RefIds: []
13 changes: 13 additions & 0 deletions Assets/Gothic-Core/Localizations/Gothic-UI_it.asset
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,19 @@ MonoBehaviour:
m_Localized: col corpo|dissolvenza
m_Metadata:
m_Items: []
- m_Id: 199062989374627840
m_Localized: Visuale dopo caduta
m_Metadata:
m_Items: []
- m_Id: 199062989416570880
m_Localized: a lato|col corpo
m_Metadata:
m_Items: []
- m_Id: 199062989416570881
m_Localized: 'Dopo una caduta profonda l''eroe resta a terra e si rialza: la
visuale resta a lato (non scende) o scende e risale col corpo'
m_Metadata:
m_Items: []
references:
version: 2
RefIds: []
13 changes: 13 additions & 0 deletions Assets/Gothic-Core/Localizations/Gothic-UI_pl.asset
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,19 @@ MonoBehaviour:
dr\u0105\u017Cek, gdy jest otwarty)"
m_Metadata:
m_Items: []
- m_Id: 199062989374627840
m_Localized: Widok po upadku
m_Metadata:
m_Items: []
- m_Id: 199062989416570880
m_Localized: "z boku|z cia\u0142em"
m_Metadata:
m_Items: []
- m_Id: 199062989416570881
m_Localized: "Po g\u0142\u0119bokim upadku bohater le\u017Cy i wstaje: widok
zostaje z boku (nie opada) albo opada i wstaje razem z cia\u0142em"
m_Metadata:
m_Items: []
references:
version: 2
RefIds: []
18 changes: 18 additions & 0 deletions Assets/Gothic-Core/Localizations/Gothic-UI_ru.asset
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,24 @@ MonoBehaviour:
m_Localized: "\u0441 \u0442\u0435\u043B\u043E\u043C|\u0437\u0430\u0442\u0435\u043C\u043D\u0435\u043D\u0438\u0435"
m_Metadata:
m_Items: []
- m_Id: 199062989374627840
m_Localized: "\u0412\u0438\u0434 \u043F\u043E\u0441\u043B\u0435 \u043F\u0430\u0434\u0435\u043D\u0438\u044F"
m_Metadata:
m_Items: []
- m_Id: 199062989416570880
m_Localized: "\u0441\u0431\u043E\u043A\u0443|\u0441 \u0442\u0435\u043B\u043E\u043C"
m_Metadata:
m_Items: []
- m_Id: 199062989416570881
m_Localized: "\u041F\u043E\u0441\u043B\u0435 \u0433\u043B\u0443\u0431\u043E\u043A\u043E\u0433\u043E
\u043F\u0430\u0434\u0435\u043D\u0438\u044F \u0433\u0435\u0440\u043E\u0439 \u043B\u0435\u0436\u0438\u0442
\u0438 \u0432\u0441\u0442\u0430\u0451\u0442: \u0432\u0438\u0434 \u043E\u0441\u0442\u0430\u0451\u0442\u0441\u044F
\u0441\u0431\u043E\u043A\u0443 (\u043D\u0435 \u043E\u043F\u0443\u0441\u043A\u0430\u0435\u0442\u0441\u044F)
\u0438\u043B\u0438 \u043E\u043F\u0443\u0441\u043A\u0430\u0435\u0442\u0441\u044F
\u0438 \u043F\u043E\u0434\u043D\u0438\u043C\u0430\u0435\u0442\u0441\u044F \u0432\u043C\u0435\u0441\u0442\u0435
\u0441 \u0442\u0435\u043B\u043E\u043C"
m_Metadata:
m_Items: []
references:
version: 2
RefIds: []
22 changes: 13 additions & 9 deletions Assets/Gothic-Core/Scripts/Adapters/Npc/NpcJumpFall.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using Gothic.Core.Models.Movement;
using Gothic.Core.Models.Vm;
using Gothic.Core.Services;
using Gothic.Core.Services.Config;
using Gothic.Core.Services.Movement;
using Gothic.Core.Services.Npc;
using Gothic.Core.Services.World;
Expand All @@ -32,14 +33,14 @@ namespace Gothic.Core.Adapters.Npc
public class NpcJumpFall : MonoBehaviour, INpcJumpFall
{
[Inject] private readonly GameStateService _gameStateService;
[Inject] private readonly ConfigService _configService;
[Inject] private readonly AnimationService _animationService;
[Inject] private readonly PhysicsService _physicsService;
[Inject] private readonly LedgeService _ledgeService;
[Inject] private readonly NpcNavMeshService _npcNavMeshService;

private const float _gravity = 9.81f;
private const float _maxFallSpeedH = 6f;
private const float _deepFallHeight = 2f;
private const float _outOfWorldFallHeight = 100f;
private const float _groundProbeExtra = 0.1f;
private const float _climbMinSeconds = 0.6f;
Expand Down Expand Up @@ -218,7 +219,7 @@ private void StartFall(Vector3 velocityH)

_physicsService.DisablePhysicsForNpc(_npc.PrefabProps);
_npc.PrefabProps.AnimationSystem.StopAllAnimations();
_fallAnimName = "S_FALLDN";
_fallAnimName = FallPose.FallDown;
PlayIfExists(_fallAnimName);

Logger.Log($"[NpcJumpFall] {_npc.Go.name} falls (speed {_fallVelocityH.magnitude:F1} m/s).", LogCat.Ai);
Expand Down Expand Up @@ -271,10 +272,10 @@ private void TickFall()
transform.position = position + moveH + Vector3.up * moveY;

var fallen = _fallStartFeetY - (transform.position.y - RestHeight);
if (fallen > _deepFallHeight && _fallAnimName != "S_FALL")
if (fallen > NpcFallDomain.LyingFallHeight && _fallAnimName != FallPose.Front.Flight)
{
_npc.PrefabProps.AnimationSystem.StopAnimation(_fallAnimName);
_fallAnimName = "S_FALL";
_fallAnimName = FallPose.Front.Flight;
PlayIfExists(_fallAnimName);
}
else if (!_npc.PrefabProps.AnimationSystem.IsPlaying(_fallAnimName))
Expand All @@ -293,16 +294,19 @@ private void TickFall()
private void Land(float height)
{
_npc.PrefabProps.AnimationSystem.StopAnimation(_fallAnimName);
var isDeep = height > _deepFallHeight || _isThrown;
var isDeep = height > NpcFallDomain.LyingFallHeight || _isThrown;
_isThrown = false;
StartSequence(State.Landing, isDeep
? new[] { "T_FALL_2_FALLEN", "T_FALLEN_2_STAND" }
: new[] { "T_FALLDN_2_STAND" });
? new[] { FallPose.Front.Landing, FallPose.Front.StandUp }
: new[] { FallPose.FallDownToStand });

// NPCs' fall damage comes with the combat system, the hero's always (HeroFallService).
var damage = NpcFallDomain.GetFallDamage(_gameStateService.GuildValues, _npc, height);
if (damage > 0)
var isDamageOn = _configService.Dev.EnableCombatSystem;
if (isDamageOn && damage > 0)
GlobalEventDispatcher.FallDamage.Invoke(_npc, damage);
Logger.Log($"[NpcJumpFall] {_npc.Go.name} landed after {height:F1} m.", LogCat.Ai);
Logger.Log($"[NpcJumpFall] {_npc.Go.name} landed after {height:F1} m, fall damage {damage}" +
(isDamageOn || damage <= 0 ? "" : " - not applied (EnableCombatSystem off)"), LogCat.Ai);
}

/// <summary>
Expand Down
Loading