Animation of dynamic positions

Hi,

I wanted to interpolate some dynamically generated positions but it seems like this method is a bit dated compared to the robust-looking animation system in place.

https://doc.babylonjs.com/babylon101/animations

Is there an example where an animation keeps getting added into the keys to continue the animation on?
Lets say a new position is generated, and we want the object to continue its animation without stopping, how does this work in a system where you are using functions to start and stop an animation from and to a specific frame.

eg: var anim = scene.beginAnimation(box1, 0, 100, false);

The scenario would go

Object has a list of positions to go to, object goes to penultimate position but 5 more positions are generated, without stopping, I want it to continue and keep playing the position changes.

Feelign a bit stumped, thanks

Interpolating beteen values never gets dated; the animation system just makes it easier to have keyframes. If you don’t care about the history of the animation, adding keyframes would only unnecessarily spend memory.

https://playground.babylonjs.com/#U4TBRN#3

1 Like

Thanks the example looks like what I need. I will look at using the animation keyframes for simpler animations.

2 Likes