No problem, these are standard functions for easing movement:
float AAbilityProjectile::EasingIn(float t, float b, float c, float d)
{
t /= d;
return c * t * t * t + b;
}
float AAbilityProjectile::EasingOut(float t, float b, float c, float d)
{
t /= d;
t--;
return c * (t * t * t + 1) + b;
}
So these are basically just translating your [0, 1] interval into a different [0, 1] interval. You can remove one of the * ts to have quadratic easing, which is less agressive. You would use them like this, where t is the current time passed since moving on the spline started, b is 0 (no offset), c is 1 (the multiplier) and d is the duration (the total time moving on the spline from start to end)
void AAbilityProjectile::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
TimePassed += DeltaTime;
float Tween = EasingIn(TimePassed, 0, 1, TimeTotal);
float Dist = Tween * Spline->GetSplineLength();
FVector Location = Spline->GetWorldLocationAtDistanceAlongSpline(Dist);
FRotator Rotation = Spline->GetWorldRotationAtDistanceAlongSpline(Dist);
MyComponent->SetWorldLocation(Location);
MyComponent->SetWorldRotation(Rotation);
Again, I plan to replace those functions with a Curve component, this way the designer can decide what easing he wants. I havent started working on it but I don’t see why it shouldn’t work.