diff --git a/trajectory-kt/src/commonMain/kotlin/space/kscience/trajectory/Obstacles.kt b/trajectory-kt/src/commonMain/kotlin/space/kscience/trajectory/Obstacles.kt index 64e8eab..407810d 100644 --- a/trajectory-kt/src/commonMain/kotlin/space/kscience/trajectory/Obstacles.kt +++ b/trajectory-kt/src/commonMain/kotlin/space/kscience/trajectory/Obstacles.kt @@ -206,7 +206,7 @@ public class Obstacles(public val obstacles: List) { connection.obstacleIndex, connection.direction, endArc - ) ?: error("No tangents between obstacle and endpoint") + ) if (remainingObstacleIndices.none { obstacles[it].intersects(tangentToEnd.tangentTrajectory) }) return setOf( TangentPath(tangents + tangentToEnd)