why are these two different? the c++ version has only two params while the bp one has 4
Both versions actually exist in C++.
The first is the one you override in your ACharacter derived native class:
virtual void OnMovementModeChanged(EMovementMode PrevMovementMode, uint8 PreviousCustomMode = 0);
The second one can only be implemented in blueprint:
UFUNCTION(BlueprintImplementableEvent, meta=(DisplayName="OnMovementModeChanged", ScriptName="OnMovementModeChanged")) void K2_OnMovementModeChanged(EMovementMode PrevMovementMode, EMovementMode NewMovementMode, uint8 PrevCustomMode, uint8 NewCustomMode);
The implementation of
K2_OnMovementModeChanged while passing
CharacterMovement->CustomMovementMode as the
New Movement Mode and
New Custom Mode respectively.
I guess these two additional parameters are passed to the BP version to save the overhead of having to call two additional getters if the are needed. In the C++ version you can directly access these from the movement component the same way it’s done in