vnen / godot-tiled-importer

Plugin for Godot Engine to import Tiled Map Editor tilemaps and tilesets
MIT License
835 stars 87 forks source link

Add support for horizontal and vertical offset in map layers #136

Open vmenezio opened 3 years ago

vmenezio commented 3 years ago

Plugin version 2.3, from Github Godot 3.2.1 Tiled 1.4.3

Issue description Map layer horizontal and vertical offset values are not accessible from imported metadata.

Steps to reproduce

  1. Create a tile layer in a Tiled map with offset set to a non-zero value: image

    Resulting .tmx file should have a line like this:

    <objectgroup id="4" name="products" offsetx="0" offsety="-8">
  2. Try to retrieve the offset data from Godot:
    print("offset available? ", layer.has_meta("offsetx"))
    >>> offset available? false

Sample map or tileset test-offset.zip