diff options
| author | James Barnett <noreply@jamesbarnett.xyz> | 2020-12-31 15:48:37 +0000 |
|---|---|---|
| committer | James Barnett <noreply@jamesbarnett.xyz> | 2020-12-31 15:48:37 +0000 |
| commit | 58ff14f5c31b933a1d2f91d6cae7280366d3ffb9 (patch) | |
| tree | 343ed88fc4b6ecab173e4d24e4ca810b70588c1f /src/main/kotlin/Raycaster.kt | |
| parent | 29e52544d389f88a4af836ae1d82b838ed7a10c7 (diff) | |
| download | kotlin-raycaster-58ff14f5c31b933a1d2f91d6cae7280366d3ffb9.tar.xz kotlin-raycaster-58ff14f5c31b933a1d2f91d6cae7280366d3ffb9.zip | |
Keep camera in map boundary
Diffstat (limited to 'src/main/kotlin/Raycaster.kt')
| -rw-r--r-- | src/main/kotlin/Raycaster.kt | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/main/kotlin/Raycaster.kt b/src/main/kotlin/Raycaster.kt index f012ba8..53c6dc6 100644 --- a/src/main/kotlin/Raycaster.kt +++ b/src/main/kotlin/Raycaster.kt @@ -27,8 +27,6 @@ class Raycaster { do { rayX += raySweepAngle.cosine() / options.stepPrecision rayY += raySweepAngle.sine() / options.stepPrecision - - // TODO bounds checking objectTypeHit = map.data[rayY.toFlooredInt()][rayX.toFlooredInt()] } while (objectTypeHit == 0) |