Riesgho Posted August 8, 2016 Share Posted August 8, 2016 Hello all, I'm trying to execute (at the awake of the scene) an already exported animation with Babylon, but it just "jumps" to the end frame without animation. if (BABYLON.Engine.isSupported()) { var canvas = document.getElementById("renderCanvas"); var engine = new BABYLON.Engine(canvas, true); BABYLON.SceneLoader.Load("", "roulette.babylon", engine, function (newScene) { // Wait for textures and shaders to be ready newScene.executeWhenReady(function () { // Once the scene is loaded, just register a render loop to render it engine.runRenderLoop(function() { newScene.render(); //for(var i= 0;i<newScene.meshes.length;i++) //console.log(newScene.meshes[i].name); var newAnimation = newScene.beginAnimation(newScene.meshes[3], 540, 50000, true); }); }); }, function (progress) { // To do: give progress feedback to user }); } Find attached an extract of the mesh. modelExtract.txt Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 9, 2016 Share Posted August 9, 2016 Hey! You cannot call beginAnimation in your renderLoop else it will be called on EVERY frame Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.