Hello!
I made an image, then an image instance called 'img' and I set its origin to:
setOriginForImage(img, img.width/Engine.SCALE/2, img.height/Engine.SCALE/2);
I did this so I can rotate the image around its exact center with img.rotation = img.rotation + 1;
Now, whenever i want to change the X coordinate of img, it behaves very strangely.
I put this code in an 'Every 0.02 seconds' loop:
setXForImage(img, img.x/Engine.SCALE + 1);
trace(img.x/Engine.SCALE);
This drastically changes the X coordinate of img, not even close to 1.
It's X increases very fast, by around the original width of the image / 2 + 1.
The rotation around the center works fine.
Am I doing something wrong?
Is this a bug?
Thank you!