From 4c3d5d1c9d96610f38a3e5c0e6c36b709fa6d9bb Mon Sep 17 00:00:00 2001 From: Harold Serrano Date: Sun, 11 Jan 2026 08:16:41 -0700 Subject: [PATCH] [Patch]Fixed demo game --- Sources/DemoGame/main.swift | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/Sources/DemoGame/main.swift b/Sources/DemoGame/main.swift index 18cdc2c8..d639082a 100644 --- a/Sources/DemoGame/main.swift +++ b/Sources/DemoGame/main.swift @@ -156,13 +156,13 @@ // ----------------------------------------------------- registerCustomSystem(ballSystemUpdate) registerCustomSystem(dribblingSystemUpdate) - // registerCustomSystem(cameraFollowUpdate) + registerCustomSystem(cameraFollowUpdate) // Input (WASD) for the demo InputSystem.shared.registerKeyboardEvents() // Disable SSAO - SSAOParams.shared.enabled = false + SSAOParams.shared.enabled = true // Test Fast quality (8 samples, half-res) SSAOParams.shared.quality = .high } @@ -172,7 +172,7 @@ // Stadium (static mesh) let stadium = createEntity() setEntityMesh(entityId: stadium, filename: "stadium", withExtension: "usdz") - translateBy(entityId: stadium, position: simd_float3(0.0, 0.0, 0.0)) + translateBy(entityId: stadium, position: simd_float3(0.0, -0.5, 0.0)) // Player (animated, named for lookup) let player = createEntity() @@ -193,21 +193,11 @@ // Camera + lighting moveCameraTo(entityId: findGameCamera(), 0.0, 3.0, 10.0) ambientIntensity = 0.4 - - let waypoints = [ - CameraWaypoint(position: simd_float3(0, 3, 10), lookAt: .zero, segmentDuration: 2.0), - CameraWaypoint(position: simd_float3(10, 3, 0), lookAt: .zero, segmentDuration: 2.0), - CameraWaypoint(position: simd_float3(0, 3, -10), lookAt: .zero, segmentDuration: 2.0), - CameraWaypoint(position: simd_float3(-10, 3, 0), lookAt: .zero, segmentDuration: 2.0), - ] - - startCameraPath(waypoints: waypoints, mode: .loop) } - func update(deltaTime dt: Float) { + func update(deltaTime _: Float) { // Skip logic if not in game mode if gameMode == false { return } - updateCameraPath(deltaTime: dt) } func handleInput() {