Animating Sprite position with easing function: can't use Animation.CreateAndStartAnimation()!

Hi there,

I’m trying to animate a sprite. Not the sprite sheet texture, but its position, and with easing function.

I was trying BABYLON.Animation.CreateAndStartAnimation() as usual, but BOOOM! Animation.CreateAndStartAnimation() requires a Node instance and Sprite isn’t one (basically it throws an exception because sprite.getScene() does not exist).

I really want to use the cool easing functions I’m used to, but I really don’t how to do that with sprites.

Any pointer?

you can simply create animations by hand:


Thanks for the super-fast answer, it works great thanks to you :wink:

1 Like