Ok, so I have a sprite that is 41x41 pixels wide. I have the pivot set in the dead center. I have the left and right keys set to rotate it, and when I rotate it, it is offset by a pixel.
Rotated 0 it looks right.
Rotated 90 it's offset by 1 pixel to the right
Rotated 180 it's offset by 1 pixel to the right
Rotated -90 it's offset by 1 pixel to the right
anyone else see this, or now a way around it?
I know I could manually set it back a pixel in if it is rotated other than 0, but I shouldnt have to do that if the pivot is in the dead center.
Offline
This is from John: "I think this due to rounding up the half-pixel (since it's an odd number of pixels) when rotated. it could be a bug or it could just be a side effect of the pixel rotation code quantizing to the nearest pixel.
One could try rotating a costume with an even number of pixels (e.g. 40 x 40); it should not shift when rotated by multiples of 90 degrees.
I should mention that the rotation center is a pixel location even though it is shown a cross-hairs through the center of a pixel. "
Offline
I suggested some time ago that rotation centers be allowed on a half-pixel grid. Has any thought been given to implementing this?
Offline