deepnight / ldtk

Modern, lightweight and efficient 2D level editor
https://ldtk.io
MIT License
3.44k stars 192 forks source link

[Suggestion] Per Tile Origin #444

Open ghost opened 3 years ago

ghost commented 3 years ago

Hello, following your suggestion, I'm opening an issue for each feedback I've written on the discord channel.

Give the ability to define custom origins for each tile. The origin will be the location where the tile snaps to grid. This is useful when tiles can graphically extend some portions of itself over to other tiles, which is often the case.

For anyone who needs it, the current suggestion given by @deepnight is:

It's not exactly the same, but currently, if you have a 16x16 tiles layer, using a 24x24 tileset, you can define the pivot coordinate to decide how your larger tiles should be aligned in this layer grid. It allows overlapping, but it's global to all the tiles in this tileset

Though it might be a little unproductive if your tiles have different sizes and origins.

deepnight commented 3 years ago

Hi and thank you for this suggestion :)

Just to narrow the feature a little bit more and understand your need:

  1. do you need an origin "per tile" or "per selection of tiles"? For example, if you have a large tree made of multiple tiles in your tileset, would you like your origin to be defined for the whole tree (ie. group of tiles), or are you looking for origin per individual tile only?
  2. I guess but want to make sure: you need this pivot to be saved in the tileset with the project, or do you only need to change origin on the fly, right before painting it (ie. you have to re-set the origin everytime you use this tile)?
ghost commented 3 years ago
  1. I'm looking for per individual tile only. It isn't too tedious for me to set for each tile of a large tree if needed as it's going to be done only once per asset. Even then, the origin for each split tiles could possibly be different.
  2. Yes, it should be saved in the tileset. I don't need to change it on the fly for each instanced tile.