Skip to content

Commit e534b84

Browse files
committed
check side visibility if the corresponding setting is enabled for breaks
1 parent 661ab1a commit e534b84

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/kotlin/com/lambda/interaction/construction/simulation/BuildSimulator.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,8 +767,11 @@ object BuildSimulator {
767767
val reachSq = interactionConfig.interactReach.pow(2)
768768

769769
boxes.forEach { box ->
770+
val sides = if (interactionConfig.checkSideVisibility) {
771+
box.getVisibleSurfaces(eye).intersect(Direction.entries)
772+
} else Direction.entries.toSet()
770773
// ToDo: Rewrite Rotation request system to allow support for all sim features and use the rotation finder
771-
scanSurfaces(box, Direction.entries.toSet(), interactionConfig.resolution) { side, vec ->
774+
scanSurfaces(box, sides, interactionConfig.resolution) { side, vec ->
772775
if (eye distSq vec > reachSq) {
773776
misses.add(vec)
774777
return@scanSurfaces

0 commit comments

Comments
 (0)