Increase Speed on Every Frame

my .h file

public:
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
		float movSpeed = 8;
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
		float incrSpeed = 0.25f;

& cpp file

APlayerChar::APlayerChar()
{
 	// Set this character to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
	PrimaryActorTick.bCanEverTick = true;

	movSpeed += incrSpeed;
}

I try to increase player current speed in very frame, Actually i making infinity runner game for increase dificallty when they run use incrSpeed but it change only (8) to (8.25), i requesting to developer please help me and provide suffisient Answer i Hope you understanding my request

You increase the variable value, but you never actually increase the character’s speed.

GetCharacterMovement()->MaxWalkSpeed = movSpeed;

And just a tip: don’t do it on Tick, better set a timer; with Tick, every player will have different results depending on their hardware.

You are increasing in class constructor, which only executes once.

Override event Tick instead. And multiply by frame time to make it framerate independent. Eg :

void APlayerChar::Tick(float DeltaTime)
{
    Super::Tick(DeltaTime);

    movSpeed += incrSpeed * DeltaTime;
}

This will increase movSpeed smoothly by 0.25 per second, regardless of frame rate.

thanks for Answering

it’s Working

Actually I make Runner game i use SetActorLocation, but thanks for reply it use-able on BindAxis Code