C++ move component/pawn to target location

Hey Guys,

I’m looking for a way to snap the pawn to a location when something happens or similar to this function:

UKismetSystemLibrary::MoveComponentTo(GetMesh(), target_position, FRotator::ZeroRotator, false, false, 5.0f, EMoveComponentAction::Move, Looll);  

this is copied from code that calls blueprint (UKismet) function which i don’t want to call it but do it’s logic in my code. anyone know any way that will do similar thing like this kismet function? i was looking at the source code it’s using something called FLatentActionManager which is hard to understand what is going on there .

what i’m trying to achieve is snap the pawn to ledge holding with hand but that’s animation which is ok to implement. when i jump toward ledge to stop there and snap to wall/ledge. i set the movement mode to flying when it’s needed and character is flying but what i wanna do is snap to the wall and prevent moving like the function from kismet:

any idea is welcome on how to achieve this!