Hi I am building a animation blueprint at the moment. However I have a problem that some of the animations are not correctly lined up. So when that state is fired off the character floats a bit into the air. Is their somewhere I can set a offset for a specific animation so that it lines up correctly?
Itâs usually best to keep the mesh location at the base of the capsule. If a specific animation is floating like that, it could be because the root bone or pelvis bone is too high in the animation file, which you can easily lower in the animation. If you want a solution at runtime, you can trace from the feet to the ground to find out what the distance is, then add an IK offset node (transform bone) in the animation blueprint, for the pelvis bone, in component space, additive, and plug a float into the z value of the input vector of the node. You would have to be selective when you run it, as that same system would also have a running animation constantly keeping your feet on the ground. You would also want to ensure that the trace to get that z value happens after CharacterMovement updates, so it is accurate to the current tick/frame.
I donât know about in-depth animation correcting, but have you tried just slightly lowering the location of the mesh in the character BP?
If you are using starter animation blueprints, I believe they use a mechanic that automatically tries to put the playerâs feet exactly on the ground even if they would normally be under or over slightly. This would hopefully prevent a slight mesh adjustment from hurting other animations.
If youâre modifying the animation in-engine, lower the root bone or pelvis bone to where you want it, being careful only to change the z axis value. Near the top of the screen is a big plus sign button called Key. Pressing that or the hotkey S will create an additive layer track for that bone. Do that, then hit the apply button near the top and save it. When you play the animation in the engine, you should see the change.
âIf a specific animation is floating like that, it could be because the root bone or pelvis bone is too high in the animation file, which you can easily lower in the animation.â
How do I lower this? I tried to move the bone down in the animation, but it seem to do nothing.
I believe something like this is best done with âAdditive Layer Tracksâ. In the animation window, you can add tracks per bone and edit the translation via keyframes.
I have been using them for small adjustments quite often as they are completely non-destructive. They are a bit annoying to work with though.
The only way I can get some effect from moving the root bone is to change âRoot motion root lockâ to âfirst frameâ, but that causes some other issues. Am I missing something?