diff --git a/tests/unit/first-person-navigation-controller.test.ts b/tests/unit/first-person-navigation-controller.test.ts index b411c480..875f7443 100644 --- a/tests/unit/first-person-navigation-controller.test.ts +++ b/tests/unit/first-person-navigation-controller.test.ts @@ -65,6 +65,11 @@ function createRuntimeControllerContext( } ); const domElement = document.createElement("canvas"); + const createVolumeState = () => ({ + inWater: false, + inFog: false, + waterSurfaceHeight: null + }); return { domElement, @@ -92,10 +97,7 @@ function createRuntimeControllerContext( feetPosition: Vec3, shape: FirstPersonPlayerShape ) => options.canOccupyPlayerShape?.(feetPosition, shape) ?? true, - resolvePlayerVolumeState: () => ({ - inWater: false, - inFog: false - }), + resolvePlayerVolumeState: () => createVolumeState(), resolveThirdPersonCameraCollision: ( _pivot: Vec3, desiredCameraPosition: Vec3