Let’s say I get updated mesh position data from the server 10 times per second. How then, in the simplest way, can I make the mesh move smoothly with a babylon?
Here is a simple example.
It uses an interval of 10 times per second. Here he looks twitchy. I would like it to move smoothly.
I’ve read other forum posts about this, but the solutions look very complicated. I would have preferred a solution in a couple of lines of code
Sometimes, the only way to properly solve a problem is write more than a few lines of code
The easiest way to animate in Babylon would probably be CreateAndStartAnimation: Animation | Babylon.js Documentation which is a single line.
Thanks for the answer! This solution really works, but it looks more like a crutch. I would not like to create animation ten/fifteen times per second
This may hekp as well
Thanks for the answer! Looks like a solution to the problem, but if it hits setInterval, it starts to twitch
Well, you did ask for few lines of code, so that’s what I gave you.
You can simply extend this method by “batching” the received positions into one longer animation.