Jump to content

Per-bone Animation

Views: 396 | Comments: 0   

First pass at per-bone animations, combining upper body and lower body actions.

This is all it takes to control this animation:

    //Load a model
    auto model = LoadModel(world, "Models2/merc/merc.mdl");
    auto bone = model->skeleton->FindBone("spine_01_Military_Male");

    //Main loop
    while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false)
        if (window->KeyDown(KEY_UP))
            model->Animate("walk", 0.4);
            model->Animate("idle", 0.4);
        if (window->KeyHit(KEY_SPACE)) model->Animate("shoot", 0.25, 100, ANIMATION_ONCE, 0, bone);



  • Like 1
  • Upvote 1

User Feedback

There are no comments to display.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Write a comment

×   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.

  • Create New...