Skip to content

Comments

Fix: OccluderSystem ignored entity rotation when calculating AABB#6417

Closed
ThereDrD0 wants to merge 1 commit intospace-wizards:masterfrom
ThereDrD0:fix/occluder-rotation
Closed

Fix: OccluderSystem ignored entity rotation when calculating AABB#6417
ThereDrD0 wants to merge 1 commit intospace-wizards:masterfrom
ThereDrD0:fix/occluder-rotation

Conversation

@ThereDrD0
Copy link
Contributor

Issue

Occluder system translated box2 but did not take into account entity rotation. This logic only works if the box is a square.
But if someone creates non-square box2 - any rotation breaks the logic.

I found this bug while debugging why people could see through my double airlocks.

Media

Before - a rotated double airlock with boundingBox: "-0.5, -0.5, 1.5, 0.5" in Occluder is half "transparent"

2026-02-09.04-08-41.mp4

After - you can't see through it anymore. Great!

2026-02-09.04-10-29.mp4

Double airlock prototype i used when recording videos.

- type: entity  
  id: DoubleAirlock  
  parent: Airlock  
  name: double airlock  
  components:  
  - type: Sprite  
    sprite: double_basic.rsi  
    offset: 0.5,0  
    snapCardinals: false  
  - type: Fixtures  
    fixtures:  
      fix1:  
        shape:  
          !type:PhysShapeAabb  
          bounds: "-0.49,-0.49,1.49,0.49"  
        density: 100  
        mask:  
        - FullTileMask  
        layer:  
        - AirlockLayer  
  - type: Occluder  
    boundingBox: "-0.5, -0.5, 1.5, 0.5"

@PJB3005
Copy link
Member

PJB3005 commented Feb 9, 2026

Multi-tile occluders cannot work with the current occlusion system. This PR doesn't work.

@PJB3005 PJB3005 closed this Feb 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants