We do a lot of lerping in our networked application and sometimes the babylon lerp functions don’t jive well with the complexities of our app, which frequently sends updates about pos/rot.
I’m wondering if this kind of thing might be in the works at Babylon, or if I don’t actually need something like this because I should be using _____ instead. All ears!
I’m not aware of any other plug-in implementations, as it is usually very custom to a project.
Personally, I use my own serializer(when not using other networking libraries), which means I use schemas to determine whether or not a value should be interpolated, and how(quaternion, vector, integer etc). The example you linked has hardcoded position, quaternion and scale, and would benefit from a more modular approach. That being said, you could port that example to BabylonJS in five minutes and modify to your needs.
There’s not much to the page right now, just a description copied from the github readme
@FrameVRWill - How would you feel about adding a few details to the page? Maybe some instructions on how to get it set up and a small example? Is that doable?
I am trying to use this lib for default network bufferng, but still get crazy jitter
Do you have any real demos on actually using the component.
I have been trying to use it for my colyseus networking. But it is really jittery… Not smooth at all.
And hermite… jumps around like crazy.
Is there at least one working demo using this library in for networking…
Anything to show how you var calculating the velocity to appendBuffer, is is simple current position minus previous position ???
Are you sending client updates on a fixed interval or are using the regular render loop with delta time ?
We are using the lerp mode without velocity. Note that the bufferTime parameter to the constructor controls how much time the buffer will cover (in seconds). If this period is shorter than your update frequency, then you won’t get any interpolation at all.
I’m afraid I don’t have authorization to share our implementation, but, since this is a straightforward port from the open source Mozilla Hubs project, perhaps their implementation will be helpful: