You’re only running your tick function once because you set IsSwitchedCamera to false the first time you move the camera instead of all the time.
edit:
Adding this here after much discussion below.
The deltatime wasn’t being accumulated anywhere, so it was just always calling VInterpTo with a delta of some really small number around 0.01 so it didn’t look like it was moving.
float _accumulatorFloat;
void ATheMeadowsCharacter::SwitchCamera()
{
currentCameraPos = cameraTransformA;
cameraSwitch = !cameraSwitch;
if (cameraSwitch == false)
{
cameraTransformA.X = 20.0f;
cameraTransformA.Y = 40.0f;
cameraTransformA.Z = 40.0f;
}
else if (cameraSwitch == true)
{
cameraTransformA.X = 20.0f;
cameraTransformA.Y = -40.0f;
cameraTransformA.Z = 40.0f;
}
_accumulatorFloat = 0.0f;
isSwitchedCamera = true;
}
void ATheMeadowsCharacter::Tick(float DeltaSeconds)
{
Super::Tick(DeltaSeconds);
if (isSwitchedCamera == true)
{
_accumulatorFloat += DeltaSeconds;
FVector finalCamPos = FMath::VInterpTo(currentCameraPos, cameraTransformA, _accumulatorFloat , 0.5f);
FollowCamera->SetRelativeLocation(finalCamPos);
isSwitchedCamera = false;
}
}