Skip to content

Commit

Permalink
Default camera far to 1000 units
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasGorisse committed Jun 19, 2024
1 parent 68fdc59 commit da2b348
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ open class CameraNode(engine: Engine, entity: Entity) : Node(engine, entity), Ca
}

// Far = 1 km
private var _far = 30.0f//1000.0f
private var _far = 1000.0f
override var far: Float
get() = super.far
set(value) {
Expand Down Expand Up @@ -335,7 +335,7 @@ open class CameraNode(engine: Engine, entity: Entity) : Node(engine, entity), Ca
updateProjection()
}

private fun getViewPortAspect() =
fun getViewPortAspect() =
viewport?.let { (it.width.toDouble() / it.height.toDouble()) }?.takeIf { !it.isNaN() }
?: 1.0
}

0 comments on commit da2b348

Please sign in to comment.