LuaEntity::mirroring specifics

User avatar
PennyJim
Fast Inserter
Fast Inserter
Posts: 135
Joined: Wed Jan 18, 2023 3:49 am
Contact:

LuaEntity::mirroring specifics

Post by PennyJim »

Boskid recently gave pretty good detail about what exactly it means for an entity to be mirrored
I believe it should make it into the documentation
Boskid wrote:Thu Sep 18, 2025 9:20 pm when i was un-messing the entity flipping logic and mirroring logic (and there as a lot of stuff to un-mess), i came up with following rule that governs how mirroring should behave:
direction gives you a primary direction (for example north). mirroring gives you a secondary direction. If entity is not mirrored, then secondary direction is primary direction rotated right by 90deg. If entity is mirrored, then secondary direction is primary rotated left by 90deg
that means an assembler "North, not mirrored", will have its prototype-north stuff facing real north, and its prototype-east facing real east
if entity is "east, mirrored", then its prototype-north will be facing east (this is the primary direction), and its prototype-east will be facing north (this is the secondary direction)
Bilka
Factorio Staff
Factorio Staff
Posts: 3644
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: LuaEntity::mirroring specifics

Post by Bilka »

Thank you for posting this here! Docs updated for 2.0.69.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Post Reply

Return to “Resolved Requests”