godot: AnimationTree: Add2 in BlendTree does not seem to be additive
Godot version:
3.2 df876601c8
OS/device including version: Manjaro Linux
Issue description: I was building a blendtree expecting to see the pose of my root bone to be added together. This node seems to blend between two poses rather than produce a sum of poses.
Steps to reproduce: I have a jumping animation and a running animation both with the root bone controlling the motion. As in the attached video, you can see that the forward motion is reduced as the jump is increased.
Is this the expected result? Am I doing something wrong?
I read the documentation and expected this node to produce additive results.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 9
- Comments: 33 (12 by maintainers)
Of course it is far from good, but it can help with something.
cc @reduz, as he implemented the animation state machine.
https://github.com/godotengine/godot/blob/50582446ad13a7ce034bdd8695409bf26c1abac3/scene/animation/animation_tree.h#L70-L73
https://github.com/godotengine/godot/blob/50582446ad13a7ce034bdd8695409bf26c1abac3/scene/animation/animation_tree.h#L98-L99
https://github.com/godotengine/godot/blob/50582446ad13a7ce034bdd8695409bf26c1abac3/scene/animation/animation_tree.cpp#L116-L119
https://github.com/godotengine/godot/blob/50582446ad13a7ce034bdd8695409bf26c1abac3/scene/animation/animation_tree.cpp#L958-L970
I added a new blend_input_add function in “animation_tree.cpp”
https://github.com/godotengine/godot/blob/50582446ad13a7ce034bdd8695409bf26c1abac3/scene/animation/animation_blend_tree.cpp#L406-L413
Is this getting fixed anytime soon?
Is a fix for
3.x
planned? I feel this is important enough to warrant a3.x
backport, considering how long this issue was open for.This is useful thanks for this.
I think the final solution for this will look a bit different but this is a good boost in the right direction.
Yeah there are ways around this but I find without this node that my animation workload increases significantly without it. I’m mostly struggling with the activity map and this COW array for the blend data. There has to be a way to combine two tracks in an additive method. I’m busy for today but might have some time tonight to keep cracking at it.
I’m also not a core dev so I hope I can slap something together that’s half decent tonight, but no guarantees.
I am hoping that Juan sees this at some point though, because he wrote that file and hasn’t changed it much as well as it lacks enough comments for me to understand it quickly. I imagine he might be able to whip this node up pretty quick.
@jedStevens It would be great. I really need this. Thanks for helping.
I modified the source code of the existing nodes Add2 and Add3 and managed to make them work as in blender. But I don’t think it should be a good thing to do that. But, for my purposes, I think it will be enough. I can show it later so you can see if it has anything useful.