AramCP Posted November 25, 2016 Share Posted November 25, 2016 I was setting the colissions for my game when something strange happened, my tile ID seems to be weird. Look at that: map.setCollision(93, true, layer3); As you can see i set collision in my tile with ID 93. I added some tiled screenshots: http://prntscr.com/dbt5ar http://prntscr.com/dbt5gj Well, but i enter the game and it doesnt works. http://prntscr.com/dbt4x8 maybe you think my code is wrong but its not that, look what happens when i try to walk to the left: http://prntscr.com/dbt6fd My door tile is ID 91, and i can colide with it, while i set the colission in tile 93. Its like it moves 2 tiles to the left. Guys do yo know why is happening that? Thanks for reading. Link to comment Share on other sites More sharing options...
nazimboudeffa Posted November 25, 2016 Share Posted November 25, 2016 everything seems okey, just verify the order of called layers Link to comment Share on other sites More sharing options...
AramCP Posted November 25, 2016 Author Share Posted November 25, 2016 17 minutes ago, thefailtheory said: everything seems okey, just verify the order of called layers Layers are okey, its just i add colision to id 23 and colides the 21, i add colision to 21 and colies 19... i dont get it Link to comment Share on other sites More sharing options...
nazimboudeffa Posted November 25, 2016 Share Posted November 25, 2016 did you scaled the sprite ? Link to comment Share on other sites More sharing options...
AramCP Posted November 26, 2016 Author Share Posted November 26, 2016 9 hours ago, thefailtheory said: did you scaled the sprite ? Yeah its 32x64 Link to comment Share on other sites More sharing options...
nazimboudeffa Posted November 26, 2016 Share Posted November 26, 2016 so i think it's the reason why the collision is not precise Link to comment Share on other sites More sharing options...
Recommended Posts