I tried to do this also, but the problem is that i put the refence in the middle of the object, so in my case PosX = 0 and PosY = 0 all the time.

If i separate the componet x and the componet y, i would have to put the reference in a corner of the object. And i was searching this option for change the reference and i didn't find it.  ???