5
$\begingroup$

Okay, so this may be a duplicate, but I sure couldn't find it. In this question the OP wanted to know how to make his animation play.

Scenario: I have an animation on my object (or armature) and I want to be able to play them in the game engine. How do I do this?

$\endgroup$
6
$\begingroup$

This can be done in the game logic view using an action actuator. First ensure the Armature Modifier on your mesh is at the top of the Modifier stack or at least above Subserf. Change the screen layout to Game logic and the physics type to Blender Game using the drop-downs at the top of the screen.

enter image description here

Select your object that you want the animation to play from and in the logic Editor space, (large grey empty bottom of the screen) click the Add Sensor button and select always.

enter image description here

Now remember that a sensor sets conditions for something to happen, so you may not want to use the Always in different circumstances.

Click Add Controller > AND along with Add Actuator > Action.

Select your animation in the light grey box on the action actuator

enter image description here

and set the start and end values to encompass the entire length of the animation. My animation is 60 frames long, so I set start to 1 and end to 60.

enter image description here

The last step is to connect all the little dots in between the boxes so that it forms one string of logic. Always > AND > Action

enter image description here

Press P to play the game and see the animation play.

$\endgroup$
  • $\begingroup$ That is if you want the animation to play in one single .blend file. Apparently, playing animations in separate files loaded via libload is not possible. $\endgroup$ – yPhil Mar 18 '15 at 10:30
  • $\begingroup$ Nice tutorial, very useful. I have a question: if i use modifier to animate a mesh, how can i get keyframes from it to feed in the action actuator? I use Blender 2.75 wave modifier to make a simple water surface on a subdivided plane. It loooks nice but i can't "play" it in the game engine since i don't have any keyframes. Do you know a way to get this working? I tried to place some keyframes on the wave modifier but it didn't do anything. Merci $\endgroup$ – user18515 Oct 3 '15 at 6:17
  • $\begingroup$ while, animating with modifiers and shapekeys and such is a long way from being fully supported, I would recommend using drivers on an animated armature to power them. i don't know enough about drivers to really say much more than that but google looks like it has some stuff. $\endgroup$ – Scalia Oct 3 '15 at 16:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.