Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualBCullis

Posted 29 November 2012 - 04:43 PM

Your update method:

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();
}
}
}


What does rotate() do? Because by your explanation, mBounding.rotate handles the collision object rotation, and the sprite for the object is rotated by the spritebatch call.

If the sprite is being rotated by a spritebatch call, you should be giving it the same degree value that mBounding.rotate receives. Is that the case?

#1BCullis

Posted 29 November 2012 - 04:42 PM

Your update method:

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();
}
}
}

What does rotate() do?

If the sprite is being rotated by a spritebatch call, you should be giving it the same degree value that mBounding.rotate receives. Is that the case?

PARTNERS