Jump to content

How do LoadAnimation/Animate work ?


Roland
 Share

Recommended Posts

I have a model that will have quite a number of animations.

There is no problem with getting the model with is idle animation into LE2.

Now I want to add more animations by loading them from GMF files (same Model, same Rig, another animation).

Those GMF files contains the animaton and the bones (no mesh).

 

This is what I thought would work with this approach.

TModel model = LoadModel( "abstract::mymodel.gmf");      // CountAnimations returns 1
LoadAnimation( model,  "abstract::mymodel@walk.gmf");  // CountAnimations returns 2
LoadAnimation( model,  "abstract::mymodel@run.gmf");  // CountAnimations returns 3
// ... more animations...

// Main loop
Animate( model, AppTime()/30, 1, curAnimation ) ; // where curAnimation = 0, 1, 2

 

The only animation that works is the one in the original model file ( curAnimation ).

I have checked that each gmf-file has a working animation in the ModelViewer and they are all ok

 

Where is my misstake ?

 

Thanks

Roland

AV MX Linux

Link to comment
Share on other sites

Yes, it's the best way to have animations in seperate gmf files. Roland said in his status update though that he got it to work. I wonder what the trick was?

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...