读取的tmx文件中对象层的对象的y坐标错误

各位大虾,小弟在学习使用tiled地图对象层的时候遇到了这个问题,我根据网上博客的方法读取tmx对象的x,y值,奇怪的事情发生了,x值是对的y值一直是错的,下面是小弟代码部分:

tmx:

<objectgroup name="Object1" width="30" height="30">

name="Spoint" x="0" y="288" width="32" height="32"/>

name="www" x="260" y="278" width="118" height="118"/>

读取部分的代码:

CGSize s1 = map.contentSize;

NSLog(@"ContentSize: %f, %f", s1.width,s1.height);

NSLog(@"----> Iterating over all the group objets");

CCTMXObjectGroup *group = ;

for( NSDictionary *dict in group.objects) {

NSLog(@"object: %@", dict);

}

NSMutableDictionary *StartPoint = ;

int x = intValue];

int y = intValue];

这里不论是断点还是打印,y值都是564(应该是278),

百度没有答案,哪位大虾给指点一下。

现在发现是坐标系问题,但是坐标系怎么改呢?

转换一下,Tiled的坐标Y的定点在左上,如果IOS用就直接用,如果用cocos就需要翻转一下,cocos的做Y坐标顶点在左下。