TheConceptBoy Posted November 17, 2018 Share Posted November 17, 2018 Working on putting together a gun animation, when I found that Leadwerks has a handy too animation sets tool in it's model viewer. How does one separate the animations in Maya for Leadwerks to detect? This is a bone rigged pair of hands with a weapon. I'm working in Maya. Not sure if I've ever seen an animation set menu in here. Quote Link to comment Share on other sites More sharing options...
TheConceptBoy Posted November 17, 2018 Author Share Posted November 17, 2018 To answer my own question: When exporting from Maya, all the animations are stored in one single long time-line. So I have to use the "Extract Sequence" tool in the Leadwerks model viewer to separate them into their own standalone animations. 1 Quote Link to comment Share on other sites More sharing options...
Thirsty Panther Posted November 17, 2018 Share Posted November 17, 2018 Aggror has a good video on how to do this as well. 1 Quote Link to comment Share on other sites More sharing options...
TheConceptBoy Posted November 18, 2018 Author Share Posted November 18, 2018 Yes, that's what I've ended up figuring out. I'm currently trying to figure out how to detect the EndAnimation call of an object in C++ so that I can switch to other stuff once a particular animation is done. I thought it'd be something like if (hands_revolver->EndAnimation("fire")) {} but there's no documentation example for C++ for this as far as I've looked. Quote Link to comment Share on other sites More sharing options...
TheConceptBoy Posted November 18, 2018 Author Share Posted November 18, 2018 Unless I'm getting it wrong and I'm supposed to create a new class that has a function called EndAnimation(string animation) and Leadwerks would detect and trigger that function. Correct me if I'm wrong. Quote Link to comment Share on other sites More sharing options...
gamecreator Posted November 18, 2018 Share Posted November 18, 2018 Looks like you found another topic on this but yes, you need to keep track of it yourself because animations can be mixed. I use model->SetAnimationFrame(animationframe, 0.8, animationstate, true) to set a character's animation every frame. I increment and keep track of animationframe myself based on how much time has passed since last frame. Then I use model->GetAnimationLength(animationstate) to check if animationframe has exceeded the end of the animation. If it has, I reduce it appropriately (which isn't necessarily the same as setting it to 0). 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.