I’m making a game engine, and some of the transitions between animations will always blend, but some of them will only sometimes blend, and other times not blend, which is very annoying.
For example, I have a walk animation and a jog animation, and I have the frames for both perfectly lined up in python so that when the walk animation blends into the jog animation, there is a seamless transition. The transition from walk to jog almost always works flawlessly. However, when in jog mode, I line up the frames perfectly so that there should be a seamless transition back to the walk animation when my character slows down, but I’d say 2/3 times it does not blend, which causes a very ugly transition.
I have the same problem going back to my ‘always sensor’, for my static/idle animation.
It is glaringly obvious when jumping… his arms blend nicely as he jumps, raising them in the air, and then snap back to his sides when descending…
My guess is that you may be trying to run both actuators at the same time; perhaps you should deactivate the stopped actuator (if you’re walking and you speed up to jog, just activate the jogging animation and deactivate the walking animation). I, too, though, have had this problem before.
i just realised i also have the same problem as OP, going from run to walk, and i believe i understand why now…
@morphinapg, what we both failed to notice, is that if the condition never ends, then it will never blend back to the other state.
What i mean is, my idle anim was ‘always’ and so it never stopped doing the idle anim, so it would snap back to the idle anim when any key was released.
Likewise, i presume your jog / walk keys is something like ‘w’ for walk and ‘shift+w’ for jog.
In this case, adding a ‘nor’ and attaching to the ‘shift’ sensor, and attaching that nor to the walk anim actuator, should resolve both our problems!
(it worked for mine anyways!)
Post a screenshot of your logic bricks if this doesnt make sense, and i’ll try to do some drawings to make it clearer
Actually my game is quite advanced so I can’t really show the logic bricks here. To break it down in simple terms I’ll say this: In python, I determine my object’s overall speed based on the Pythagorean theorem (sqrt(vx^2+vy^2)) and save that value to a property. Then, in my logic bricks, I do the following:
Property sensor, =0: Idle Animation
Property sensor, 0.001 to 3.0356: Walk Animation
Property sensor, 3.0357 to 32.3808 (represents maximum speed): Jog Animation
I’m also planning on adding a running animation later which will run from 12.1428 to max speed.
When one animation starts, the others stop. There shouldn’t be a conflict. I thought that might be a problem but I already made sure everything wasn’t conflicting.
btw, there’s a reason for those strange numbers, but I won’t take the time to explain them here lol.