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); } else { model->Animate("idle", 0.4); } if (window->KeyHit(KEY_SPACE)) model->Animate("shoot", 0.25, 100, ANIMATION_ONCE, 0, bone); world->Update(); world->Render(framebuffer); }
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.