Polygon rotation in 2D...

Hi,
I’m doing up a tank game in Java and I am having difficulty in the polygon representation of the tank, when rotating.

The problem is that when I rotate the polygons, they seem to ‘pivot’ around a point. What I would like to do is have the polygons just rotate in a fixed position. As would a real tank, when it is performing a stationary turn.
I am using simple polygons, constructed from float arrays, using the fillpolygon method. I’m just trying to keep it simple so I can understand it ;D

I hope that my explanation is clear enough, without having to show the code - it’s very messy :-/ I’m just hacking it together to implement ideas. Yes, it may be a case of re-inventing the wheel but for me, it’s the only way to understand something and I enjoy it :wink:

My apologies is this question would have been better answered in the 3D forum…

I hope that someone can provide some enlightenment :wink:

Funny, I was just doing this tonight,… you have to make sure the origin is in the center of your tank before you rotate it.
I actually used Shapes that are centered around the orgin. To draw them on the map I translate to where they shouild be, rotate according to the heading of the shape, draw it, then reset the transform and do the same for the next…