"Shortest Path" for RInterp To Node?

I’m wondering why there’s no “Shortest Path” checkbox for the “RInterp To” node. This would be very useful. In some cases I have to use the “Lerp (Rotator)” node because the Rinterp node causes jittery results.
Is it possible to add a “Shortest Path” option to the node?

1 Like

Struggling with the same issue. Using RInterpTo without shortest path causes full turns when animating a character’s head.

I know this is a question from 2016, but i was wondering the same, so I made my own node:

FRotator UMyMathLibrary::RInterpToConstant(FRotator Current, FRotator Target, float DeltaTime, float InterpSpeed, bool bShortestPath)
{
	// if shortest path, we use Quaternion to interpolate instead of using FRotator
	if (bShortestPath)
	{
		FQuat AQuat(Current);
		FQuat BQuat(Target);

		FQuat Result = FMath::QInterpConstantTo(AQuat, BQuat, DeltaTime, InterpSpeed);

		return Result.Rotator();		
	}

	return FMath::RInterpConstantTo(Current, Target, DeltaTime, InterpSpeed);   
}

Basically you’ve got to use Quaternions. I’m basically doing the exact same thing the RLerp node does.

1 Like