holschuh Posted November 24, 2015 Share Posted November 24, 2015 HI, is there a short code snippet to do a time dependent single cycle animation. my trys with an animate not close to the end or to fast... cu Volker Quote Link to comment Share on other sites More sharing options...
cassius Posted November 24, 2015 Share Posted November 24, 2015 I don't use lua but heres my c++_ one shot anim code void kill_badguy() { if(badguy.frame < badguy.animlength) { badguy.model->SetAnimationFrame(badguy.frame,1,badguy.seq); badguy.frame = badguy.frame + 0.3; } if(badguy.frame >= badguy.animlength) badguy.alive = false; } Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ Link to comment Share on other sites More sharing options...
holschuh Posted November 25, 2015 Author Share Posted November 25, 2015 Hi, thx i think there is no short trick to get my which.. i miss the time:getcurrent somewhere and i think if(badguy.frame <(=) badguy.animlength) and the +0.3 stops animation in some cases before the last Animation frame. My try in lua is nearly the same..so i blow my code to get it more robust for different animation length/speet.. cu Volker Quote Link to comment Share on other sites More sharing options...
cassius Posted November 25, 2015 Share Posted November 25, 2015 You can change the 0.3 to soe other value. Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ 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.