Hi everyone. I am using cocos2d-x with tiled.
I have tried to solve this problem the whole afternoon, but failed. I want to get the collision information of the tile which is created by Tiled Collision Editor. I found I cloud access the information through objectGroup. But what I expect is using
getPropertiesForGID to get that information.
This is the procedure I have thought:
- loop through all tiles
- find the GID of the current tile by
- get the properties( which should include the collision information) by
- use the collision information to create physics
I stuck as #3 because
getPropertiesForGID returns a blank ValueMap.
I have come up with another way to solve it is that is naming all the tile in Tiled Collision Editor and find the collision information by objectGroup, but obviously, once the project gets larger I will be in the grove of naming, which is not pleasant.