I am trying to make a fighting game where two characters are fighting with hands or can have some weapon in their hands. It's a multiplayer game targeting initially for mobile devices. In Game, there would be some animation and when that weapon hit other character body, its health will decrease.
I have two different updates implemented. One is Fixed update which calls after every 100ms and all game logic is implemented there and other update is for drawing, running at 60 fps. Now when two players are fighting and one player is animating to hit other, I need to show others player's decrease of health at the time of hit. Now as drawing update is different, I got a hit event in an update but When should I have to decrease the health?
As my all game logic is running in fixed update, I am updating characters health in fixed update and decide whether it's still alive or dead but due to this, on screen, it shows some delay in decreasing health. I want to know am I doing something wrong? What is the standard way to achieve this?
Thanks