Rotation Animation Help

Hey everyone,

I am trying to make an animation that rotates around the local Y axis, however im not sure how i can do that in an animation. Here is my attempt:

However this goes by global axis.

I had used a setInterval function to update cube.addRotation() however setInterval is causing some other problems, and i would much rather use babylon animations.

Any ideas how i could do this?

Currently the only way i can think around it is:

Make my own class for a self box, make getter and setter for rotation that can take vector or number, if number is used addRotation is called within the setter, if vector do regular global rotation.

However thats very messy and i was hopoing there is a better way.

Here we are:

1 Like