I’ve been implementing my own movement component in unreal engine and to do that I started analyzing how UPawnMovementComponent
works. There is one part I find a bit confusing - how movement input is handled.
In the APawn
class there are two methods: APawn::AddMovementInput
and APawn::Internal_AddMovementInput
. AddMovementInput
checks if the pawn has a movement component, if yes, then calls UPawnMovementComponent::AddInputVector
, otherwise calls APawn::Internal_AddMovementInput
directly. Makes sense so far, but then I take a look at UPawnMovementComponent::AddInputVector
and all it does is call APawn::Internal_AddMovementInput
anyway.
What’s the point of all this? Is it to allow input vector manipulation on per-movement-component basis? If so, what’s a potential use case for this - why would someone need to change input at this step? I took a look at the Lyra example project, but it’s not overridden there. Are there any examples where it’s used I can take a look at?