Current frame from ongoing animation

Is it possible to get the current frame of ongoing animation ? .
I need to do a door open and close animation. When the button for door open is pressed, I make an animation and run it from frame 0 to 100 for opening. While opening, if the user click the close button, then the door needs to close from where the current position of door, instead of it’s 100 to 0, So I need to get the current frame. If I get it, then I can open it from, currentFrame to 100 for Opening, and currentFrame to 0 for Closing.

It seems that you may get it with currentFrame() - RuntimeAnimation | Babylon.js Documentation

1 Like