Title pretty much sums it up, I’m using a action actuator for many actions, and switching the action through python but frame blending doesn’t work between actions.
I searched for that a while ago to and couldn’t find anything.
Try making 2 action actuators and change between them with a boolean. That’s what I did…
I thought I might have to do that, bummer.
Same here. I spent a lot of time trying to do this but the only solution I could find was having two actuators. Finally I wrote a function that would toggle between one actuator and another each time I tell it to run an animation. Save both actuators on a list and save that list as a property of your object, then another property containing the number of the current actuator. Then you just toggle them, activate one, deactivate the other.
Not ideal, but I couldn’t figure any better way.
I currently have a action controller set up which allows me to play animations at different speeds, it should be fairly simple to switch actuators everytime I play a new animation.
The problem is I have a actuator for every body part, so now I’ll need 10 actuators and I’ll have to do that for every character :S
Just out of curiosity, are all those actuators for the same armature? Because that’s another thing I couldn’t get to work. Blending also didn’t work if I had two actuators active at the same time on the same armature. This one I just gave up trying and now my different body parts simply don’t blend with each other.
Oh btw, I also adapted my set animation speed function to toggle the actuators just like you’re doing
Yes they’re all for the same armature. Its strange that you have problems because I never came across any. Perhaps its how you did you’re actions, you can’t put key frames in for the bones you don’t wish to use, so say you want to animate legs, you only put keyframes in for legs.
I got the blending to work
There’s a variable called “blendTime” on action actuators. It has to be between 0 and blendIn (the number of blending frames to create). When the action is activated, it seems to function as the blending framecounter… as in it starts at 0 and counts up until blendIn is reached, then it stays at blendIn.
When you change actions, you also have to reset blendTime to 0. Once it’s 0, it’ll start creating blending frames again.
Example file is attached. I added a check to see if the animation was, in fact, changing, but it shows the correct blending happening. Just remember that blendTime needs to be set to 0!
Always investigate things whose functions you don’t know!
pythonBlending.blend (35.2 KB)
Oh that did solve the problem. Thanks a lot Sam. You won’t need 10 actuators anymore Andrew
Ahh, thanks heaps.