apparently from what I read , this snap back issue is caused by root motion. But I tried to enable root motion in the animation like the documentation says and it makes no difference. still does same thing. Is there anything else I can do? Thanks
You should make sure the animation actually has root motion. Double click the animation to view it. Then from select “Character -> Animation -> Process Root Motion”. This should show you if there is root motion.
Also you can not drag a root animation directly into the scene and expect it to work. It has to be part of a blueprint where the root motion can move the root component capsule.
Well when " process root motion " is not selected he keeps rolling in one place. When “process root motion” is selected , he keeps rolling along , right off the side of the floor. That is the only difference I see. The animation is in the animation bp and added into the state machine there. Otherwise it plays fine , character just snaps back to the start awkwardly at the end of the animation. It’s like he teleports back almost. From what I been reading it seems the capsule stays put and the mesh moves, so he snaps back to the capsule. Its just like it talks about in the root motion documentation , because if I roll up against a static mesh , he will roll right through it. But all they said is to enable root motion , which I tried. They mention another root motion dropdown menu , but I don’t have that in 4.20.
actually I see I do have that other dropdown. so when to " no root motion extraction" it does the above behavior. set to any of the other options ( montages only , ignore root motion , root motion everything, etc…) its like he rolls in place sideways. Not forward like he was. Its almost like he is rolling against an invisible wall sideways. but he is not snapping back , though that could be because he is rolling in place and not really moving anywhere. With "process root motion " on and the bone hierarchy on , he kinda rolls sideways along the floor and it looks like the root is on the floor and sliding along it , and there is a red line behind him, like this.
when I disable root motion , his standing pose changes a bit to the side. And though he rolls from left to right on the screen , he is actually rolling forward.
Anybody know a way around this? When capsule is set to visible , you can see the character jump right out of it when animation plays. Can the capsule be attached to the root bone? I noticed that in the anim bp if I set it to " root motion from everything" , then in pie , he rolls in place , no matter whether “enable root motion " is checked or not in the animation. Just like if I set anim bp to " from montages only” then he rolls forward and out of the stationary capsule , whether " enable root motion " is checked or not in the animation.
I’m figuring it may be something in the current project, i borrowed the roll animation from the Action RPG and it behaves exactly the same. I used the original roll animation i was using in a fresh project and even though it did not roll forward ( more to the right), the capsule did move with the character.
Root motion only works on root bone (hence root motion)
Looking at the screenshot you posted, its not the root bone moving, but one bone below it. Check your bone hierarchy.
Don’t know from where you got the animation, but for example blender default export makes a new “bone” on top of your hierarchy, which is the armature object itself. It’s stupid, and ■■■■■ up the whole root motion, but that’s a thing. If you rename your armature to “armature” before exporting, UE4 ignores that bone, and your hierarchy remains intact