A couple of noob questions

Hi all,

Started a video game project a few months ago and I’m having a few initial problems.

1: I have 3 separate animations running on the game engine. Left, Right and Up. I want pressing Left and Right to produce the Up animation. I’ve got that working but the animation gets stuck a lot of the time or jumps between the idle stance and the Up pose.

2: Is it possible to change the animation playback speed in the game engine? I want animations to play faster depending on the speed of a character.

3: How do you combine animations? I want to move forward and attack simultaneously but a few armature animations must be overlapping. Does priority come into play for that?

I’ll probably have more questions. Thanks for all your help! I know these questions are probably basic but I haven’t been at this long :). Still learning each time I work on it.

Thanks!

I think for questions 1 and 3 you need to look at playing the animations on different layers. You might have better control over your animations if they are activated with properties rather than direct keyboard input.

I’m not sure it is possible to control animation playback speed in the game engine with logic bricks. You can set the playback speed of the animation with python using the playAction() function.

http://www.blender.org/documentation/blender_python_api_2_60_3/bge.types.html?highlight=playaction#bge.types.KX_GameObject.playAction

You may control the animation speed if you use property instead of play/loop or whatnot.
Then you need to create a logic setup to control the property you’re using as reference.

Ideally you don’t want to combine/add/superimpose animations because that can easily lead to unwanted results and is heavier than having one animation.

Traditionally you should have different animations for hands and feet so you can attack with hands while you run. These animations are set so that one animation exclusively controls a set of bones while the other does the same for the other. The division should be reflected in the naming convention: myCharacter_feet_run, myCharacter_hands_run, myCharacter_hands_attack, myCharacter_head_turn for example. Of course only divide what you really need divided.

I see your situation as a good point to look into python, seeing you want to separate linear input -> animation and control the speed. playAction() takes a lot of arguments but it’s not that hard to set up.

Thanks for all the help!

Don’t really know where to start with python but I’ll have a go.

I don’t really understand how to get properties to work with animations though. Is that through scripting too?

And I also tried deleting bone actions from animations that overlapped but it didn’t work.

Thanks again!

Step 1 - Animations output properties (from frame) or use property to handle animation(I like this best)

incoming video

the property can then be used to time things, or control animation state or???