From abd2c8ce3ac2b40b63d7423f4b5d0af31c993cb7 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Sat, 11 Apr 2026 20:59:15 +0200 Subject: [PATCH] Add maxStepHeight to RuntimePlayerMovement and related controllers --- src/runtime-three/first-person-navigation-controller.ts | 1 + src/runtime-three/runtime-scene-build.ts | 3 +++ src/runtime-three/third-person-navigation-controller.ts | 1 + 3 files changed, 5 insertions(+) diff --git a/src/runtime-three/first-person-navigation-controller.ts b/src/runtime-three/first-person-navigation-controller.ts index f9d40c32..d1e954ef 100644 --- a/src/runtime-three/first-person-navigation-controller.ts +++ b/src/runtime-three/first-person-navigation-controller.ts @@ -51,6 +51,7 @@ function cloneRuntimePlayerMovement( templateKind: movement.templateKind, moveSpeed: movement.moveSpeed, maxSpeed: movement.maxSpeed, + maxStepHeight: movement.maxStepHeight, capabilities: { jump: movement.capabilities.jump, sprint: movement.capabilities.sprint, diff --git a/src/runtime-three/runtime-scene-build.ts b/src/runtime-three/runtime-scene-build.ts index bcba0da1..30b86541 100644 --- a/src/runtime-three/runtime-scene-build.ts +++ b/src/runtime-three/runtime-scene-build.ts @@ -116,6 +116,7 @@ export interface RuntimePlayerMovement { templateKind: PlayerStartMovementTemplate["kind"]; moveSpeed: number; maxSpeed: number; + maxStepHeight: number; capabilities: PlayerStartMovementCapabilities; jump: PlayerStartJumpSettings; sprint: PlayerStartSprintSettings; @@ -312,6 +313,7 @@ function cloneRuntimePlayerMovement( templateKind: movement.templateKind, moveSpeed: movement.moveSpeed, maxSpeed: movement.maxSpeed, + maxStepHeight: movement.maxStepHeight, capabilities: clonePlayerStartMovementCapabilities(movement.capabilities), jump: clonePlayerStartJumpSettings(movement.jump), sprint: clonePlayerStartSprintSettings(movement.sprint), @@ -328,6 +330,7 @@ function buildRuntimePlayerMovement( templateKind: resolvedTemplate.kind, moveSpeed: resolvedTemplate.moveSpeed, maxSpeed: resolvedTemplate.maxSpeed, + maxStepHeight: resolvedTemplate.maxStepHeight, capabilities: clonePlayerStartMovementCapabilities( resolvedTemplate.capabilities ), diff --git a/src/runtime-three/third-person-navigation-controller.ts b/src/runtime-three/third-person-navigation-controller.ts index 44c9cd2d..0b1460f0 100644 --- a/src/runtime-three/third-person-navigation-controller.ts +++ b/src/runtime-three/third-person-navigation-controller.ts @@ -65,6 +65,7 @@ function cloneRuntimePlayerMovement( templateKind: movement.templateKind, moveSpeed: movement.moveSpeed, maxSpeed: movement.maxSpeed, + maxStepHeight: movement.maxStepHeight, capabilities: { jump: movement.capabilities.jump, sprint: movement.capabilities.sprint,