auto-git:

[change] src/runtime-three/runtime-host.ts
 [change] tests/unit/runtime-host.test.ts
This commit is contained in:
2026-04-25 04:01:16 +02:00
parent c6f2181e2d
commit 6de5116629
2 changed files with 4 additions and 8 deletions

View File

@@ -1467,11 +1467,12 @@ export class RuntimeHost {
currentHorizontalDistance, currentHorizontalDistance,
minimumCenterDistance minimumCenterDistance
); );
let targetFeetPosition = { const desiredFeetPosition = {
x: npc.position.x + normalizedDirectionX * desiredHorizontalDistance, x: npc.position.x + normalizedDirectionX * desiredHorizontalDistance,
y: playerFeetPosition.y, y: playerFeetPosition.y,
z: npc.position.z + normalizedDirectionZ * desiredHorizontalDistance z: npc.position.z + normalizedDirectionZ * desiredHorizontalDistance
}; };
let targetFeetPosition = desiredFeetPosition;
if ( if (
currentHorizontalDistance < desiredHorizontalDistance - 1e-4 && currentHorizontalDistance < desiredHorizontalDistance - 1e-4 &&
@@ -1481,9 +1482,9 @@ export class RuntimeHost {
for (let step = 1; step <= 8; step += 1) { for (let step = 1; step <= 8; step += 1) {
const t = step / 8; const t = step / 8;
const candidate = { const candidate = {
x: playerFeetPosition.x + (targetFeetPosition.x - playerFeetPosition.x) * t, x: playerFeetPosition.x + (desiredFeetPosition.x - playerFeetPosition.x) * t,
y: playerFeetPosition.y, y: playerFeetPosition.y,
z: playerFeetPosition.z + (targetFeetPosition.z - playerFeetPosition.z) * t z: playerFeetPosition.z + (desiredFeetPosition.z - playerFeetPosition.z) * t
}; };
if ( if (

View File

@@ -764,11 +764,6 @@ describe("RuntimeHost", () => {
hostInternals.runtimeScene?.entities.npcs.find( hostInternals.runtimeScene?.entities.npcs.find(
(candidate) => candidate.entityId === npc.id (candidate) => candidate.entityId === npc.id
) ?? null; ) ?? null;
console.log("dialogue debug", {
telemetry: playerTelemetry,
state: hostInternals.dialogueParticipantState,
npc: runtimeNpc
});
expect(canOccupyPlayerShape).toHaveBeenCalled(); expect(canOccupyPlayerShape).toHaveBeenCalled();
expect(playerTelemetry).not.toBeNull(); expect(playerTelemetry).not.toBeNull();