Gil Posted September 19, 2017 Share Posted September 19, 2017 Hello, I used to go to a specific frame in an animation by launching this command : scene.beginAnimation(box1, 100, 100, true); There is now an error saying : Uncaught TypeError: Cannot read property 'frame' of undefined Is it possible to go to a specific timeframe another way ? Right now my solution is to be sure that the start and end frames are always differents. Would be cool to make it work like before if there is anything that could prevent it. Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted September 19, 2017 Share Posted September 19, 2017 First, why are you saying true to loop endlessly? At best, this is going to suck cpu needlessly. I do not even know what happens should try to add a 2nd animation when this on never ends. If you are getting an error with 3.1: double check 3.0 behaves correctly then, run with max version of 3.1, and report line number. The other obvious thing you should do is respect the error. If it says 'box1' is undefined, then put a window.alert(box1.name + " really exists") on the line before. Failure to actually accept reality leads directly to sorrow. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted September 19, 2017 Share Posted September 19, 2017 PG or its hard to troubleshoot. Quote Link to comment Share on other sites More sharing options...
Gil Posted September 20, 2017 Author Share Posted September 20, 2017 I just copied the line in the basic PG for animation. I'm not looping in my code, sorry for that. Here is a PG : https://www.babylonjs-playground.com/#2BLI9T#167 Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted September 20, 2017 Share Posted September 20, 2017 Ok, looks like you may not have an animation which has a start and end being the same. If you do, the start has 1 added to it, see. In this RuntimeAnimation class there is also a gotoFrame() method. I do not use this system, so I do not know how you call this. I do not even remember even see this class before. The playground also errors running 3.0. I also thought playground ran max versions. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 20, 2017 Share Posted September 20, 2017 I'll fix this as this is kinda bug 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.