levigilbert / godot-LDtk-import

Basic GDscript for importing LDtk files into the Godot game engine.
MIT License
126 stars 15 forks source link

Collisions are not created correctly if we set a single tile at the right side of the level. #15

Closed divby00 closed 2 years ago

divby00 commented 2 years ago

LDtk version: 1.1.3 Godot version 3.5.rc5 (also happens in 3.4.4 stable) Hi, I have found some issue setting a level with a single tile width at the right of the level. This level for example: imagen If you import it, you will get these collisions: imagen I have added a few prints to try to understand what is happening and I have found that looks like initial_position is not being calculated correctly for the case where there's a single tile: imagen If I add one more tile the issue is gone: imagen The issue happens as well if there isn't any tile at the beginning of the row: imagen

levigilbert commented 2 years ago

Just updated the plugin, this should be working correctly now.

divby00 commented 2 years ago

Hi, thanks for the plugin and the quick reply ;-) Unfortunately, looks like this is still failing for the simple box use case:

Importing this map: imagen

Will give the following result: imagen

Minimum project to reproduce the issue: LDtkImporterTest.zip

levigilbert commented 2 years ago

Hey, thanks for letting me know it still wasn't working. Forgot to change a variable while I was testing, but it should be fixed now.

Let me know if it works on your end.

On Tue, Jul 5, 2022 at 12:28 AM Division By 0 @.***> wrote:

Hi, thanks for the plugin and the quick reply ;-) Unfortunately, looks like this is still failing for the simple box use case:

Importing this map: [image: imagen] https://user-images.githubusercontent.com/7277786/177255666-f2f86a55-3680-42b7-bef4-57ce6bcb2a2f.png

Will give the following result: [image: imagen] https://user-images.githubusercontent.com/7277786/177255715-a135afd3-3ebc-45f5-97a4-f5460d658149.png

Minimum project to reproduce the issue: LDtkImporterTest.zip https://github.com/levigilbert/godot-LDtk-import/files/9043473/LDtkImporterTest.zip

— Reply to this email directly, view it on GitHub https://github.com/levigilbert/godot-LDtk-import/issues/15#issuecomment-1174629477, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF3VJSISM2HUQ3P4GANWX53VSPBYVANCNFSM52SEQRWA . You are receiving this because you modified the open/close state.Message ID: @.***>

divby00 commented 2 years ago

Hi Levi, I have tested it with both the testing project and my current project and now it's working as expected!, Thanks a lot!

levigilbert commented 2 years ago

Great, glad to hear it! I just found another bug with the collision import and just uploaded it a little bit ago so you might want to grab the latest version.

Thanks, -Levi

On Tue, Jul 5, 2022, 1:57 PM Division By 0 @.***> wrote:

Hi Levi, I have tested it with both the testing project and my current project and now it's working as expected!, Thanks a lot!

— Reply to this email directly, view it on GitHub https://github.com/levigilbert/godot-LDtk-import/issues/15#issuecomment-1175396936, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF3VJSPXJBKUJJHAWLBHS3LVSSAQDANCNFSM52SEQRWA . You are receiving this because you modified the open/close state.Message ID: @.***>

divby00 commented 2 years ago

Updated! thanks for letting me know ;-) Regards