I’m studying how pawn movement is coded . ADefaultPawn is a pawn that can move according to key mappings in world scene.
Internal_AddMovementInput is called by APawn::AddMovementInput that is called in ADefaultPawn by functions like MoveForward , MoveRight to move an actor .
I know SceneRootComponent decides an actor’s transform . Basically moving an actor may be like return UpdatedComponent->MoveComponent(NewDelta, NewRotation, bSweep, OutHit, MoveComponentFlags, Teleport); //MovementComponent.cpp
I guess , where the function sets new transform .
But Internal_AddMovementInput just adds a vector world_direction * scale to another FVector variable ControlInputVector .
I think this ControlInputVector is read by other classes and set as how much new transform has been moved. PawnMovementComponent class reads GetPendingMovementInputVector defined in Pawn.cpp and sets it as one of its own functions . So I guess process on ControlInputVector should be handled in PawnMovementComponent class or super classes . But I found no evidence . The name ControlInputVector is never used in PawnMovementComponent.cpp .
I guess there’s a hidden blueprint . Where can I find this value is being processed ?
1 Like