Position and Input issues with maps imported from Tiled

I'm using the Tiled Map Importer plugin to create levels and I'm experiencing two issues - the first is that the first row of tiles (starting at 0, 0) is being imported off the top of the screen, with coordinates starting at -32:
This isn't a big problem because I can just reposition them all in the editor (or start editing the map in Tiled at row 1) but I'm just curious if there's anything I'm doing wrong importing the file?
Secondly and much worse I can't seem to get mouse clicks to work on Sprites added to one of these maps. I've added a button (which definitely works when tested as a separate scene) but when added to the imported scene the _input_event doesn't seem to fire.
I'm new to Godot so I might be doing something wrong, I don't know! I've recreated it as a simple example here, any help you can give me would be greatly appreciated!
Tags :
Best Answer
-
Zelta Posts: 83
I'm using the Tiled Map Importer plugin to create levels and I'm experiencing two issues - the first is that the first row of tiles (starting at 0, 0) is being imported off the top of the screen, with coordinates starting at -32:
i dont know the reason of this, but the tex offset is at -32, u have to change to 0 in every tile and works
Answers
looks like a offset problem, do u checked the 'centered' option?
could u paste the code or some pic? probably the method is not well connected or perhaps there is something blocvking the button
I'm not sure what centered option you mean?
Also here's the code: https://www.dropbox.com/s/gfilnbxnmiag4h7/Click Issue.zip?dl=0
the color rect is blocking the mouse, if you 'ignore' it just works.
i dont know the reason of this, but the tex offset is at -32, u have to change to 0 in every tile and works
That's great! Thank you for the help!