[2.1.17] Inserters don't recognize chests with small collision boxes near tile boundaries as valid drop targets

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

[2.1.17] Inserters don't recognize chests with small collision boxes near tile boundaries as valid drop targets

Post by sparr »

What did you do?
Modded a chest with a small collision box, placeable off grid, and placed it in arbitrary positions while setting an inserter drop target to point at it.

AI Disclosure
After discovering the misbehavior, I asked Claude Opus 5 to narrow it to a minimal reproduction then build an illustrative demonstration. The text in this post are all mine, but the contents of the mod are all Claude's. I understand what it's doing and endorse it as a good illustration of [a subset of] the problem.

What happened?
My actual use case involved an inserter already forced to carry an item to the drop location, which it then refused to drop.
In the test case presented here a normal engine-driven inserter declines earlier in the process, refusing to pick up an item since it thinks it can't deliver it.
Screenshot shows that when the southern chest is approximately centered on a tile boundary (i.e. it's position has near-integer coordinate), the inserter declines to pick up an item from the northern chest:
09-10-2026, 11-49-39.png
09-10-2026, 11-49-39.png (690.66 KiB) Viewed 221 times
What did you expect to happen instead?
Always works

Reproduction
factorio --mod-directory dir/with/the/attached/zip --load-scenario base/freeplay

PS: The "dead zone" where this happens at the edge of a tile appears to be 12/256 of a tile, and I am working around it by enlarging my chest collision box to extend beyond the dead zone in the worst case.
Attachments
inserter-offgrid-drop_0.1.0.zip
(3.41 KiB) Downloaded 11 times
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 4898
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [2.1.17] Inserters don't recognize chests with small collision boxes near tile boundaries as valid drop targets

Post by boskid »

Thanks for the report however this is working as intended. Inserter only interacts with entities that collide with tile bounding box that was shrinked by 0.05 tile (12/256th) to avoid interacting with entities on adjacent tile in case they were configured to occupy entire tile (like a steel chest with a bounding box of {{-0.5, -0.5}, {0.5, 0.5}}). This goes deep into implementation details of bounding boxes that collide when sharing an edge which is a thing because bounding boxes can be rotated. If they could not rotate, it would be a lot easier to exclude right and bottom edge of a bounding box and make them not collide when sharing an edge which would allow removing this margin.
Post Reply

Return to “Not a bug”