Book Image

JMonkeyEngine 3.0 Cookbook

By : Rickard Eden
Book Image

JMonkeyEngine 3.0 Cookbook

By: Rickard Eden

Overview of this book

Table of Contents (17 chapters)
jMonkeyEngine 3.0 Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Extending the animation control


In the previous recipe, we built the basics for an animation by managing the Control class. This would be fine for many types of games, but for a game where a character is in focus, let's say an FPS, we would want a more detailed control. This is where the concept of AnimChannel comes in handy. AnimChannel is a way of dividing a skeleton into different groups of bones and applying an animation only to them. As we will find out in this recipe, this means we can have different animations playing on different parts of the body at the same time.

Tip

Applying animations only to certain channels can help reduce the workload tremendously for a character-focused game. Let's say we're making an FPS or RPG where the character can wield a number of different items and weapons, both one– and two–handed. Making full-body animations for all the combinations, including standing, walking, running, and more, is not feasible. If instead, you are able to apply the weapon animation...