Using InterpTo for Camera

So, I’m new to UE4. I also haven’t done c++ in a good while (used other engines in-engine coding for a while now).

I’m trying to use FInterpTo and VInterpTo to move the arm and socket offset. I’ve seen a lot of people ask how to move the camera, but searched and searched and couldn’t find a good example, so I figured I’d have a shot at it.

this is what I got:

CameraBoom->TargetArmLength = FMath::FInterpTo(175.0f, 150.0f, DELTA, 2);

CameraBoom->SocketOffset = FMath::VInterpTo(FVector(0.0f, 0.0f, 20.0f), FVector(0.0f, 0.0f, 50.0f), 1 / 30.0, 2);

It may or may not be obvious, but I have absolutely no idea how to use deltatime. Right now with the above code, the camera just jumps. I know I’m doing something wrong, and typically I spend hours to days on easy stuff, and finish hard stuff a bit quicker, so it’s continually aggravating.

Could someone help explain what’s wrong, where, and why? I understand, I think, deltatime just does exact time for frames messing up etc. Just trying to get the camera to move forward a bit and up a bit smoothly.

Bumpity bump bump.

Anyone help?

You need to use the call GetWorld()->GetDeltaSeconds() to get the delta time from the engine.