Hi! It’s simple:
-
Create you own component derived from UCharacterMovementComponent. For example:
UCLASS()
class MEDIEVALTALES_API UGameCharacterMovementComponent : public UCharacterMovementComponent
{
GENERATED_UCLASS_BODY()
}; -
Setup this parameter in constructor:
UGameCharacterMovementComponent::UGameCharacterMovementComponent(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer)
{
bUseAccelerationForPaths = true;
} -
Replace default character movement component by your:
AGameCharacter::AGameCharacter(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer.SetDefaultSubobjectClass(ACharacter::CharacterMovementComponentName)) -
That is all.