Update animation multiple times in single frame

For netcoding purposes I would like the have the possibiliy run multiple non rendered frames in single render frame

Context: Some use cases. In a peer to peer game. When I don’t receive the enemies inputs for too long. I predict the input of the enemy. And when it comes in I rollback an re run those frames with received input. So when I have predicted 15 frames. This means I rewind 15 frames back and have to rerun those 15 frames with the received inputs. Right now I have been successful with everything besides the animation.

Actual problem I am having:

I say mesh->PlayAnimation(anim…). And then change the currently playing time using mesh->SetPosition(0);

Lets say here my x,y,z location is (0,0,0) and location of a hitbox that has the hands position as socket is (0,1,1)

In my SimulationFrame I do mesh->SetPosition(mesh->GetPosition()+0.1666f); Now the location should be (5,0,0) and my hand position should be (5,3,1) but its not it’s (0,0,0) and hand location is (0,1,1). So when I do my SimulationFrame 15 times in a single frame. These locations are always the same while it should be different. And when I am done and the game renders a new frame that’s when the cumulative rootmotion happens. and the hand position updates.

I would like to Tick the animation component multiple time in a single frame to get its rootmotion data and hand position