How To Unrotate with C++ Like Blueprints.

Hi, I’m trying to set up a basic flying pawn but I’m having a bit of trouble. I’m trying to work out a way to Unrotate like this person is doing with blueprints but I can’t quite work it out.

image

Any ideas on how to achieve this? The tutorial I’m using as reference is: UE4 Flying Jet Movement 4.25 - YouTube

Thanks,
Mitchell

FVector Result = GetActorRotation().UnrotateVector(GetActorUpVector());