Added limping and zombie walk animations.

AnimGraphEditor
Martin Felis 2021-11-16 17:31:18 +01:00
parent 2cedbf5e1a
commit 038f07de0a
8 changed files with 5 additions and 1 deletions

2
.gitignore vendored
View File

@ -1,5 +1,7 @@
.*.swp .*.swp
*.fbx
*blend1
*CMakeFiles/** *CMakeFiles/**
/.idea /.idea
/scratch* /scratch*

BIN
media/Limping-loop.ozz Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
media/ZombieWalk-loop.ozz Normal file

Binary file not shown.

Binary file not shown.

View File

@ -201,6 +201,8 @@ int main() {
skinned_mesh.LoadAnimation("../media/Walking-loop.ozz"); skinned_mesh.LoadAnimation("../media/Walking-loop.ozz");
skinned_mesh.LoadAnimation("../media/RunningSlow-loop.ozz"); skinned_mesh.LoadAnimation("../media/RunningSlow-loop.ozz");
skinned_mesh.LoadAnimation("../media/RunningFast-loop.ozz"); skinned_mesh.LoadAnimation("../media/RunningFast-loop.ozz");
skinned_mesh.LoadAnimation("../media/Limping-loop.ozz");
skinned_mesh.LoadAnimation("../media/ZombieWalk-loop.ozz");
skinned_mesh.SetCurrentAnimation(0); skinned_mesh.SetCurrentAnimation(0);
AnimationController animation_controller (&skinned_mesh); AnimationController animation_controller (&skinned_mesh);
@ -408,7 +410,7 @@ int main() {
skinned_mesh.DrawDebugUi(); skinned_mesh.DrawDebugUi();
animation_controller.DrawDebugUi(); animation_controller.DrawDebugUi();
animation_controller.Update(state.time.frame); animation_controller.UpdateTime(state.time.frame);
animation_controller.Evaluate(); animation_controller.Evaluate();
sgl_defaults(); sgl_defaults();