Using PlayAnimation call with root motion in C++ not working

I have an animation sequence with root motion that I would like to play from C++ using the USkeletalMeshComponent::PlayAnimation() call.

In my Tick method, I check for root motion and can programmatically move the actor based on root motion (I am using a subclass of an Actor, not a Character or Pawn). This all works great if I use a state machine created within BP to play the animation(s) - the animation plays, and my custom C++ code in the Tick() method updates the position and orientation of the actor. The actor ‘swims’, and when the animation loops, the movement continues from the actor’s new position - which is exactly what I want to happen.

However, if I try foregoing BP and instead play the animation directly in C++ (from the BeginPlay() method), I don’t get any root motion - the actor animates but stays in place. A breakpoint in my Tick method indicates that the root motion code is never called in this case - the Unreal Engine doesn’t think my animation is using root motion, even though it is the same exact animation used in BP.

I’ve tried explicitly setting the bEnableRootMotion boolean as well as the enum to ‘enableRootMotionfromEverthing’ (apologies, but not on my build machine at the moment so can’t remember the exact param name for this) in the code (it is enabled in the animation) to no avail.

So in summary, the same animation sequence will exhibit root motion if initiated from BP but not programmatically, even though they both use the same Tick code to turn the root motion into movement.

Anyone have any suggestions on how I can get this working?