Tick bUseControllerRotationYaw

The question: Can this be achieved without putting it all into Tick?

When the character stands still, the camera is will rotate without the character rotating along. And when walking the chracter will rotate along. I did this by toggling “bUseControllerRotationYaw”.

I’m still learning C++. Maybe Tick is the only way to go here?

void APlayerCharacter::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
SpringRot = SpringArmComp->GetComponentRotation();

	FVector CurrentVelocity(EForceInit::ForceInit);
	float VectorLength;
	bool EqualEqual_FloatFloat;

	CurrentVelocity = GetVelocity();
	VectorLength = UKismetMathLibrary::VSize(CurrentVelocity);
	EqualEqual_FloatFloat = UKismetMathLibrary::EqualEqual_FloatFloat(VectorLength, 0.0f);

	if (EqualEqual_FloatFloat == false)
	{
		bUseControllerRotationYaw = true;
	}
	else
	{
		bUseControllerRotationYaw = false;
	}
}