[all] Cocos2dx 3.0, Value produce wrong result

[all] Cocos2dx 3.0, Value produce wrong result
0.0 0


Is it a bug? x-value is right, but y-value produced wrong result

//My TMX File
//objectgroup draworder=“topdown” name=“Trees” width=“64” height=“64”>
//object name=“pohon4.png” gid=“15” x=“1698” y=“448”/>
//object name=“pohon4.png” gid=“15” x=“1624” y=“376”/>
//object name=“pohon4.png” gid=“15” x=“1703” y=“349”/>

auto groupTiled = map->getObjectGroup(“Trees”);
for (auto sp : groupTiled->getObjects())
auto dict = sp.asValueMap();
auto _point = Point(dict.at(“x”).asFloat(), dict.at(“y”).asFloat());
log(“Log of xo = %2.2f yo = %2.2f”, _point.x, _point.y);
Log of xo = 1698.00 yo = 1600.00
Log of xo = 1624.00 yo = 1672.00
Log of xo = 1703.00 yo = 1699.00



anyone? I’m still not finding the solution…
It’s produced the correct result if it’s switched to 2.2 though…


Bug conformed.
I created an issue here:
I will fix it soon.


Thanks boyuO, glad to hear that :;ok


@GulperEeL, We fixed this bug. PR link:https://github.com/cocos2d/cocos2d-x/pull/5382
We think the original ‘x’ and ‘y’ value is unneeded, we converted the ‘x’, ‘y’, ‘width’ and ‘height’ value to our engine coordinate value which is relative to tilemap position, Is that ok with you?


@boyu0 Yes, it’s ok for me. Thanks for fixing the bug