Guys idk why but when playing a specific animation montage that i downloaded from mixamo my character mesh suddenly goes 20 unit above on the air and then when the animation has finished playing it goes back to normal. why is this happening? does anybody know a fix?
i need to mention that the animations are root motion. idk if that’s whats actually causing problem.
This does sound like a root bone type of issue. Root motion animations add the root bone position as an offset to the character, as you are experiencing. Turning off Root Motion should disable the offset, but I would assume you want root motion for the animation. This would ultimately come to the animation in questions, from mixamo, which I assume moves the root bone up for some reason.
i never enabled root motion in the first place. and enabling or disabling it seems to have absolutely no effect. what should I do?
Let’s see. The character moves up when the animation plays, but root motion seems to not be the effector. I assume you went to the correct animation referenced by the montage and changed it’s settings there, saved and compiled, then tested with no solution. It’s also possible that the way the animation was imported changed something about it.
There could still be something with the animation, for example, the hip bone moves up. Typically the hip bone has influence on the entire model. You can turn on bones in the animation view to see if the root or hip bone moves in such a way.
Otherwise it comes to something in code that is creating the problem, which I’m unaware of. At that point, its a number of guesses as to why, unless someone else has experienced something so similar. It could even be something unrelated, but it’s hard to say without seeing it all. Keep trying, otherwise try a different animation.
and this doesn’t happen with other montages.
You’ve got me stumped when looking at the montage and in-game. I’ve not always had a 1 to 1 with the animation/montage viewer, did you try dragging the animation in question into a scene to see its transforms?
Also, this code shows camera changing, but where is the code that is calling the specific montage?
O sorry i uploaded the wrong screen shot
this is the right code
alright, what’s the rest of the graph look like? What’s the entire execution chain?
the rest of it is just playing some sound for the npc, its totally unrelated to the animation stuff.
and this is a problem which I had encountered before but I don’t remember how I fixed tho
I’m afraid there’s nothing else I can think of. It sounds like the animation is the problem and some setting, either on important or in-engine, like a checkbox, needs to be ticked or unticked.
Guys does anybody know what could be the cause of this? My project is on hold due to this problem.
It’s probably the animation itself.
Export it out to blender and double check it. If the position is at 0, then it must be something you are doing somewhere else.
I doubt that would be the case based on your description though.
I was having similar problems but with all my animations.
Problem was related to collision.
1 quick fix to test disable collision of Mesh of the ground asset and test it out, or readjust the collision settings.
If it works play around with collision until its sorted or u can disable collision for an animation (Chyros explains it well: Can you disable collision of the capsule for certain animations? )
Hope that helps
I realize this is an old thread, but I had a similar problem, and here’s another case that might help someone:
The short answer is: check the height of the skeletal mesh in your BP, relative to the bottom of the capsule.
Montages for certain animations worked 100% on my player, but my npc was floating off the ground. Turns out, I was stupid and in my npc character BP the skeletal mesh was +10 higher on the Z.
However, it doesn’t answer how to properly fix the specific animations in question. Possibly due to IK (or retarget?), since the ones in question were mixamo conversions, and ones from epic didnt have that problem.