Skip to content
Merged
Changes from all commits
Commits
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
18 changes: 4 additions & 14 deletions Sources/DemoGame/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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()
Expand All @@ -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() {
Expand Down
Loading