syed samoon Posted January 23, 2018 Share Posted January 23, 2018 Hi Everyone, i have a doubt. i'm using complex animation. i want to play, stop and restart based on the situation, i was refer the documentation https://doc.babylonjs.com/babylon101/animations my script was given below but i was not running. is there anything wrong in this script idleAnim = scene.beginAnimation(player.skeleton, 0, 60, true, 1.0); idleAnim.restart(); Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 23, 2018 Share Posted January 23, 2018 This should work. Can you repro your issue in the playground? Quote Link to comment Share on other sites More sharing options...
syed samoon Posted January 24, 2018 Author Share Posted January 24, 2018 playerJump= scene.beginAnimation(player.skeleton, 157, 176, false); playerJump.pause(); playerRender = function(){ //Jump if (player.moveUp) { jumpScoreAdded = false; playerJump.restart(); } } if(!killed){ scene.registerBeforeRender(playerRender); } this is my script but animation is not running and there is no more errors in console Quote Link to comment Share on other sites More sharing options...
syed samoon Posted January 24, 2018 Author Share Posted January 24, 2018 this is not working more than once 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.