ldtk
ldtk copied to clipboard
Entity Layer Grid Snap Factor
When using LDtk, a user is likely to encounter a situation where they need to move an entity so that its origin sits on the boundary between two tiles, rather than the center of a tile. In the current release, this is not possible. In the latest commit of the 0.10 branch, the user would need to manually adjust the position to achieve this.
Desired position
Available positions on the grid
To remedy this, I propose that a "Grid Snap Factor" option is added to the entity layer definition. This normalized floating point value would control the degree to which the editor aligns entities to the grid.

Here are some visualisations of how this option would change editing entities:
LDtk's current behavior. Entities are fully aligned to the grid. 1.0 should be the default Snap Factor for an entity layer.
Entities can now snap to the boundary between grid units, permitting them to be placed between tiles.
Even more granular placement is possible when required.
Related to #304