[1.1.53] Off-center collision box allows rotation into colliding orientation

Bugs that are actually features.
Post Reply
sparr
Smart Inserter
Smart Inserter
Posts: 1327
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

[1.1.53] Off-center collision box allows rotation into colliding orientation

Post by sparr »

Code: Select all

local entity = table.deepcopy(data.raw["constant-combinator"]["constant-combinator"])
entity.name = "turntable"
entity.collision_box = {{0.0, 0.0}, {1.5, 1.5}}
data:extend({entity})
This entity has an off-center collision box. If you place it and rotate it such that the collision box is northwest of the sprite, you will not be able to place an inserter northwest of the sprite due to collision. However if you place the inserter there first then you will be able to rotate this entity such that the collision boxes overlap.

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2250
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [1.1.53] Off-center collision box allows rotation into colliding orientation

Post by boskid »

Thanks for the report. I am going to call this not a bug. My fix for this case if applied would be to disallow rotating existing entity at all due to collision box not being rotationally symmetric around the {0,0} position but i am considering such fix to be possibly mod breaking and as such i am not going to do that. Instead if you want to prevent this entity from being rotated you can use "not-rotatable" flag on the EntityPrototype. There is no logic in the game that would prevent rotation if the box is not symmetric because we assume entities are not rotatable in those cases.

sparr
Smart Inserter
Smart Inserter
Posts: 1327
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: [1.1.53] Off-center collision box allows rotation into colliding orientation

Post by sparr »

Can we get that expectation/constraint mentioned in the prototype docs?

Post Reply

Return to “Not a bug”