AddImpulse and LaunchCharacter fail on X and Y only with Root Motion
This bug touches multiple BP nodes such as Add Impulse Character Movement Component; Add Impulse (Mesh); and Launch Character.
If the animations and state machine are configured to NOT use root motion then these impulse nodes will cause the Character to move on X, Y, and Z as expected and as documented.
In the failure described here the impulse will fail on X and Y but succeed on Z.
Two conditions are needed for failure:
1) Character's Animation Blueprint is configured to use Root Motion from Everything in Anim Preview Editor | Edit Defaults.
2) One or more States in the AnimGraph Default state machine must use an animation sequence (or blend space) that has 'Enable Root Motion' set to true (checked).
I believe that a root motion character should respond to impulses in 3D - currently this can happen only straight up.
When using Add Impulse (Mesh) on a bone such as 'spine_03' when physics are enabled - extreme vertical impulses will cause the character to fly up as expected. But huge horizontal impulses on X & Y will not shift the Character Movement Component - the character behaves as if the feet are anchored in concrete as the body slams sideways.
I have a sample project available for download for the asking.
asked May 14 '15 at 04:31 AM in Bug Reports
According to void UCharacterMovementComponent::PerformMovement(float DeltaSeconds) this is not a bug :
RootMotion always override Velocity on X and Y axis, launching a character will be handled on Z axis only (and that seems legit).
I solved this by overriding virtual void StartNewPhysics(float deltaTime, int32 Iterations) override; in my own CharacterMovementComponent and restoring the X/Y velocity before UE uses it, it's quite ugly but it works well for me.
answered May 29 '15 at 07:15 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here