Post Physics Update + Attached Object Jitter

Here is the current function that allows to “correct” the lag.

http://puu.sh/fnNGh/c6bdd156d0.png

http://puu.sh/fnNPp/24c964c329.png

http://puu.sh/fnNVp/207d2ea647.png

This function returns a vector that will be the place for the source at “the next frame”, which in fact counter the “lag” and make it look like it’s at its place. :wink:

For the target, to keep it aligned (if needed to be aligned):

http://puu.sh/fnOnX/bc8dce7c3d.jpg

In fact, the trick is “just” to calculate the next position of the beam source and target (calculating in fact the next position of the actor and applying the offset between the position of the beam source/target to it) using it’s current velocities (linear and angular)

Note: This is still work in progress… It’s not correcting the angular offset that is “created” by rotation the actor. but it fully counters the linear movement lag.

If the lag persists, try to change the var in the function (which is 1.045 in my case)

Cheers until this gets fixed. :slight_smile:

Erio