Oh ■■■■, I think I know what the problem is. You’re passing deltatime, but that’s probably around 0.00833 every time, but you aren’t accumulating it anywhere to have it actually increase it’s value, so try accumulating it in a float and passing it in like this:
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;
}
}