**I want to load the image in black box, but the cocos actually loaded in the red box image.**This looks like the cocos when calculating the horizontal position to the right more added a grid position…
this is my image in html:
I originally guess atlas is too large, tried many times to the size of the atlas decrease but the problem still exists.
have not found a similar situation in network, I will study the cocos source if cant find a solution
Engine: cocos2d - HTML 3.12
Thank you very much for your help. I have found the solution to the problem, and I have finally solved the BUG that has been bothering me for several nights.
Probably because of the different cocos version, the code snippet that you point to is not found in my engine file.But it led me to another place where the cocos team seems to know the Bug but it’s not fixed now:
I changed 0 to 1 and the problem was solved.
Ah, this is a bug in handling external tilesets, where they need to load this firstgid attribute from the map file and not the tileset file. Your fix probably only works in case the map is only using a single tileset.
It seems like their commented code should fix the problem. I wonder why it is commented out.