- Home /
High layer animation not overtaking locomotion
I've never had trouble doing this before, but recently I set up locomotion on a character, and set up some upper body animations with mixing transforms, and set them to a higher layer than all the animations that are being used in my locomotion system. I looked at the animation in the editor and every single upper body bone has curves.
When I set the animation to play, it only shows when I'm not moving, as soon as I start moving locomotion takes over.
I KNOW I've done this before without issue, what gives?
Answer by runevision · Apr 09, 2011 at 07:13 PM
It should work just fine. If it doesn't, it's hard to say why without actually investigating what is happening.
Have you inspected the state of the animation states while they're supposed to be playing and have effect? You can inspect animation states of an Animation component by enabling Debug mode of the Inspector and fold out the Animation States list. At the time when it should have effect, is the animation in question enabled, have a non-zero weight and is in the layer you expect it to? Is the time progressing as expected? Are any of the other animations in the same layer or higher?
Just tried that... no dice. The animation is in a higher layer than all the animations being used by the locomotion system, is enabled and at full weight. It looks like it's half-playing, like is getting distorted because its try to play at the same time as my locomotion run and he's doing half of both; but I know that should not be happening because both animations have curves on every single upper body bone.
Also if I disable the locomotion system altogether, and just play the animations i'm using with locomotion at the same time as my higher layer animation, it overrides them just fine.
Sounds like you have weight of the upperbody set to 1/2, which means "play 1/2 of both." A standard mixing animation can use weight of 1.
Nope, its at full weight, as is evident by the debug editor.
@Derek Traver If it is like you say then the problem is at the level of how the animation states work together - i.e. a bug in Unity and not with the Locomotion System. Please try to reduce the project to a $$anonymous$$imalistic setup that doesn't use the Locomotion System but still reproduces the issue. If you do that and the mystery isn't solved in the process, please file a bug report with the $$anonymous$$imal repro project attached and let me know what the bug case nr is. Thanks!
Answer by waschtel · Aug 21, 2012 at 06:18 PM
I had the same problem, I'm using several locomotiongroups for my character like in the Bootcamp-Example, some for crouching and some for standing. AddMixingTransform for upperbodyanimation only worked with the crouchgroups. On normalgroups it looked like the upperbodyanimation has only 50% of weight. When I increased the weight up to 10 it was completely overtaken, but fading the weights looked strange.
Then I figured out mixing transforms works correctly with locomotiongroups set to blendMode additive!
Your answer
