This is the rotation code for the polygon.

public void rotate(float x0, float y0, double angle) { for(int i = 0; i < mOrigins.size(); i++) { Point point = mOrigins.get(i); float x = (float) (x0 + (point.x - x0) * Math.cos(Utilities.toRadians(angle)) - (point.y - y0) * Math.sin(Utilities.toRadians(angle))); float y = (float) (y0 + (point.x - x0) * Math.sin(Utilities.toRadians(angle)) + (point.y - y0) * Math.cos(Utilities.toRadians(angle))); Point npoint = mPoints.get(i); npoint.x = x; npoint.y = y; mPoints.set(i, npoint); } }

This is the update method for the object

public void update(float deltaTime) { mAccumulatedTime += deltaTime; while(mAccumulatedTime > FIXED_FRAME_TIME) { mAccumulatedTime -= FIXED_FRAME_TIME; if(isActive()) { rotate(); mBounding.rotate(mPosition.x, mPosition.y, mDegree); drawBounding(); } } }

Trying to limit the time has no effect on the polygon and it continues to speed up and slow down.

Can anyone please identify the error or lead me in the right direction to fix this?

thanks