I need help working out the centre coordinate of a rotated rectangle regardless of the point of rotation (i.e. the rectangle doesn't rotate around its center). I do not know the coordinates of the corners, so it's not a simple case of dividing those.
It's easier to show than tell, so here's example 1:
Click to start/stop the rotation.
In this example I've got my sprite with the rotation point set to the bottom-right corner of it. If you click you'll see it rotate around that. I need to find a way to work out the coordinates of the center of the rectangle (represented by the middle red cross-hairs.)
Here is another example, this one is set to rotate at 0.3 x 0.8 into the rectangle:
You can see I added the circle into each demo, this is positioned on the sprites x/y coordinate and the radius was calculated from the distance of the center of the rectangle to the rotation origin.
I can visually see the correlation between the point of rotation and the circle, and I can see it tracks the centre of the rectangle beautifully on the circles perimeter! But I'm falling at the last hurdle in trying to calculate the actual value, so desperately need a fresh set of eyes on it please.