Is there any way to blend to a location?

How would I smoothly blend to a location like you can do with cameras? I want an object to smoothly move from point a to point b, what is the easiest way to do this? Ideally i’m looking for a function like SetActorLocationWithBlend() if something like that exists

You could use FMath::VInterpTo (Smoothing is automatic) or FMath::Lerp(No automatic smoothing, uses linear curve)

Thank you very much! I appreciate that. Could you show me how i’d implement that math function using SetActorLocation?


class AFooCharacter : public ACharacter

     virtual void Tick(float DeltaTime) override;
     FVector TargetLoc;



void AFooCharacter::Tick(float DeltaTime)

// Timer is for testing only
	static float Timer = 0;
	Timer -= DeltaTime;
	if (Timer < 0)
		TargetLoc.X = FMath::RandRange(-300, 300);
		TargetLoc.Y = FMath::RandRange(-300, 300);
		TargetLoc.Z = 300;
		Timer = 3.f;

	// How to interp
	FVector NextLoc = FMath::VInterpTo(GetActorLocation(), TargetLoc, DeltaTime, 2.f);

Note that collision will not work this way