So, long story short.
Networked game, recieving information from server on remote player that is X ms delayed due to latency.
In most games fixing this is easy, you can simply use interpolation to slowly move the character around to smooth out the movement so they are not getting snapped around the world as updates are coming in.
Now this brings up an issue with JiglibX that i am trying to tackle. Whats the best way to do this? Obviously you cant be pulling the player around every frame with moveTo, because they ignore physics collisions etc when you are doing this.
The only thing i can think of is to use forces to "nudge" the character in the right direction, but i am struggling trying to figure out how that would work.
Im using the modifed Character class someone posted here long ago that does proper body rotation.
The method i am thinking of using i am not sure if it will work as im not 100% sure on how forces are applied even after reading the Forces/Controllers article. Because technically the character already has a Forces controller correct? I mean thats how it moves. If i add another World Force on top of the one from the player moving, what would happen?
Basic method im thinking, please correct me if theres a better way.
Server Update Comes in
Player takes current location and update, get the delta Distance.
If its too far away, subtract the server position from the players position to get a vector pointing to where the player should be.
Apply this vector as a World force.
Would this work? Can you add multiple world forces(First from player input, second from server update interpolation)?
I realize this thread kind of blew up into something bigger, but im struggling trying to figure out how to solve these issues.