PS1PortalLink¶
Connects two PS1Room volumes with a portal quad.
Place at the opening (doorway / archway / window) and point at the
room on the far side.
Where it goes¶
Direct child of PS1Scene. One per opening between
two rooms. A door between Room A and Room B = one PS1PortalLink at
that door.
Transform interpretation¶
The portal's transform describes the opening:
- position — portal center.
- forward (-Z) — portal facing direction (its normal).
- right (+X) — local +X axis (half of
PortalSize.Xto each side). - up (+Y) — local +Y axis (half of
PortalSize.Yto each side).
So the portal is a quad of size (PortalSize.X, PortalSize.Y)
centered at position, oriented per the rotation.
Key fields¶
- PortalSize —
Vector2, width × height in Godot units. Default(2, 2). - FromRoom — reference to the
PS1Roomon the near side (the side the portal's-Zfaces). - ToRoom — the room on the far side.
Authoring tips¶
- Place at the wall opening, not the door plane — the portal is the void the player can see through.
- Slightly larger than the visible opening — the runtime tests the portal quad against the view frustum; a portal exactly matching the doorway gets culled when the player looks through the doorway at an angle.
- Mark the visible direction with a label in the scene tree.
The transform's
forwardis hidden from glance; "PortalA→B" in the node name keeps the topology obvious.
Two-way portals¶
A real-world doorway is bidirectional. You can either:
- Place one PS1PortalLink with FromRoom + ToRoom; the runtime walks portals both ways at render time, or
- Place two PS1PortalLinks with opposite FromRoom/ToRoom; lets
you set asymmetric
PortalSizeper direction (rare).
Default to one.
Related¶
- PS1Room — required companion.
internal/rfc/visibility-culling.md— the design rationale (excluded from this site, browsable on GitHub).