I am having issues with the onAnimationEnd() function used with an animation. It appears to be triggered at the beginning of the animation as opposed to the end.
Here is a playground: https://playground.babylonjs.com/#1GMTDN#10
Here is my desired result:
- Click on mesh, animate camera position.z and GUI rectangle alpha
- When the animation is complete (rect. alpha = 1.0), it removes an asset container from the scene and adds a new asset container, all behind a fully opaque GUI rectangle control.
- Fade the GUI rectangle alpha back to 0, revealing the new assets added from the asset container
Right now, the asset containers are removed and a new one is added when the mesh is clicked, before the GUI rectangle animation is complete. Is this behaving as intended?