# "Shortest Path" for RInterp To Node?

**URL:** <https://forums.unrealengine.com/t/shortest-path-for-rinterp-to-node/374503>\
**Category:** Community & Industry Discussion\
**Tags:** rotator, rotation, lerp, unreal-engine, question, rinterpto\
**Created:** [October 26, 2016, 2:29pm UTC](https://forums.unrealengine.com/t/shortest-path-for-rinterp-to-node/374503 "2016-10-26T14:29:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![polygon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@polygon](https://forums.unrealengine.com/u/polygon)\
**Post date:** [October 26, 2016, 2:29pm UTC](https://forums.unrealengine.com/t/shortest-path-for-rinterp-to-node/374503/1 "2016-10-26T14:29:38Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_58fb0f69](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_58fb0f69](https://forums.unrealengine.com/u/anonymous_user_58fb0f69)\
**Post date:** [January 10, 2019, 8:16pm UTC](https://forums.unrealengine.com/t/shortest-path-for-rinterp-to-node/374503/2 "2019-01-10T20:16:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Evigmae](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/evigmae/32/1187349_2.png) [@Evigmae](https://forums.unrealengine.com/u/Evigmae)\
**Post date:** [November 8, 2021, 1:38am UTC](https://forums.unrealengine.com/t/shortest-path-for-rinterp-to-node/374503/3 "2021-11-08T01:38:19Z")

</div>

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.
