So position of all your items is (0,0) and the value returned in your code snippet is correct. I guess you are incorrectly assuming that pos of your item should be equal to the centre of the item's bounding rect (gridX, y). That is not the case. To get that, create your items with rects (-w/2, -h/2, w, h) and then call setPos(gridX, y).





Reply With Quote

Bookmarks