[kovarex] Rotating rectangular entities and build range

This subforum contains all the issues which we already resolved.
Post Reply
PFQNiet
Filter Inserter
Filter Inserter
Posts: 289
Joined: Sat Sep 05, 2020 7:48 pm
Contact:

[kovarex] Rotating rectangular entities and build range

Post by PFQNiet »

This doesn't particularly come up in vanilla gameplay as most entities are square or almost-square, but all the same I feel this is a "bug" in the game engine rather than being directly related to modding so here I am.

When placing a building, your build range is based on distance from the character to the edge of the entity. This is great when placing larger entities.

However, this extension seems to be based on the prototype definition of the entity's bounding box, not accounting for rotation.

This means that placing a particularly rectangular entity that has been rotated 90 degrees doesn't respond very well to this build range extension.

For an example, have an entity with a collision_box of {{-10,-1},{10,1}} - a very wide and short rectangle. When building this entity, you can place it quite far to your left/right because the build distance is calculated correctly. However, rotate it to be narrow and tall, and you'll find that you "can't reach" to place it above/below you, because the build distance extension is based on the un-rotated box.

I would expect that build range is calculated based on the rotated bounding box, not the prototype bounding box.

Bilka
Factorio Staff
Factorio Staff
Posts: 3129
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Rotating rectangular entities and build range

Post by Bilka »

As a note, for 90162 this behaviour was specifically *not* changed, see reasoning in the last post in the thread.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [kovarex] Rotating rectangular entities and build range

Post by kovarex »

Thanks for the report, it was inconsistent indeed, it is now fixed for the next release.

Post Reply

Return to “Resolved Problems and Bugs”