the other possible alternative ``` collisionCheck...
# announcements
c
the other possible alternative
Copy code
collisionChecker.getClosetAround(this)?.let { collided ->
        state.gravityState = GravityState.GROUNDED
        setPosition(position.x, collided.rectangle.y + collided.rectangle.height)
        velocity.y = 0.0f
        state.landTime = System.currentTimeMillis()
    }
            ?: collisionChecker.getOneBelow(this)
            ?: run { state.gravityState = GravityState.FALLING }