NRA Posted April 17, 2018 Share Posted April 17, 2018 Hi, Excuse if this question is silly but I am noob in BJS! How can I evaluate when an animation has reached last frame (100) or first frame (0) if it is played backwards? Thanks Quote Link to comment Share on other sites More sharing options...
Guest Posted April 17, 2018 Share Posted April 17, 2018 Hello and welcome you can add a callback when animation ends: http://doc.babylonjs.com/babylon101/animations Quote Link to comment Share on other sites More sharing options...
NRA Posted April 18, 2018 Author Share Posted April 18, 2018 Hello David, Thanks the help! Please look at my code in Playground http://www.babylonjs-playground.com/#PTUGJ2#2 I am trying to do "Box1" follow a path between the box's centers! if there are 2 ways it choose the one the "Box1" is pointing. Actually it works if you go from "Box2" to any other, but when you came back, using ";" key, it fail! Do you know why? Thanks in advance! P.S.: the orbit cam is for help viewing Quote Link to comment Share on other sites More sharing options...
Guest Posted April 18, 2018 Share Posted April 18, 2018 Hello not sure to understand the problem (too much code around :)) Can you just create a simple repro with only the problem? Quote Link to comment Share on other sites More sharing options...
Guest Posted April 18, 2018 Share Posted April 18, 2018 Here is a PG where animationEnd is call for a forward and backward animation: http://www.babylonjs-playground.com/#VUVADH Quote Link to comment Share on other sites More sharing options...
NRA Posted April 18, 2018 Author Share Posted April 18, 2018 Hi @Deltakosh thanks the help I discovered what is happening I will try to fix! GameMonetize 1 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.