godot-tiled-importer icon indicating copy to clipboard operation
godot-tiled-importer copied to clipboard

Navigation objects are offset

Open alexkehayias opened this issue 4 years ago • 5 comments

Plugin version

Plugin version 2.3 downloaded from the Asset Library

Issue description

Navigation objects imported from Tiled are offset. When I turn on the navigation visualizer you can see the navigation area is offset compared to where the tiles are rendered. This is also the case when using pathfinding (which makes sense since pathfinding uses navigation nodes).

Screen Shot 2019-12-10 at 9 02 23 PM

Steps to reproduce

Create a tiled map and add navigation type objects to a tileset in Tiled and import into Godot. Turn on navigation visualizer in project settings.

Sample map or tileset

(let me know if you need this, would need to strip out the assets)

alexkehayias avatar Dec 11 '19 05:12 alexkehayias

I added in the offsets in Tiled which fixes it (although seems hacky).

Screen Shot 2019-12-29 at 10 20 02 AM

alexkehayias avatar Dec 29 '19 15:12 alexkehayias

Looks like it's still a problem then. If you can provide a small map that reproduces the issues it would be great.

vnen avatar Jan 02 '20 19:01 vnen

Just make a map in tiled, add a tile and an object layer and load it. All objects will show up 1 tile lower than they are in tiled.

Frontrider avatar Mar 11 '20 18:03 Frontrider

That was with tiled version 1.3.2. I can't really read your code right now, so I don't know where that offset is.

Frontrider avatar Mar 11 '20 18:03 Frontrider

@vnen Should I make a pr with my fix now (apply an offset of -1 tile on the y axis to every object) so you can check it, or should I try to get in some refactoring that may or may not succeed?

Worst case it could be a setting, like the json mode.

Frontrider avatar Mar 12 '20 15:03 Frontrider