# Need Help With FMath::Lerp, FRotator And SetRelativeRotation

**URL:** <https://forums.unrealengine.com/t/need-help-with-fmath-lerp-frotator-and-setrelativerotation/143432>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [May 13, 2020, 1:39am UTC](https://forums.unrealengine.com/t/need-help-with-fmath-lerp-frotator-and-setrelativerotation/143432 "2020-05-13T01:39:39Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Jambax](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jambax/32/904177_2.png) [@Jambax](https://forums.unrealengine.com/u/Jambax)\
**Post date:** [May 13, 2020, 8:25am UTC](https://forums.unrealengine.com/t/need-help-with-fmath-lerp-frotator-and-setrelativerotation/143432/2 "2020-05-13T08:25:44Z")

</div>

FMath::Lerp blends between two values based on an Alpha. The values you are blending between cannot change as you lerp (well, they can, but it doesn’t give the right effect). Because of the way rotations are handled (they wrap and are normalised) the standard ‘Lerp’ function doesn’t apply to them in the same way.

For Rotators, you would usually convert them to Quaternions and use FQuat::Slerp(), or you can use FMath::RInterpTo to move towards a target rotation at a given speed.

E.g.:

```auto

FRotator NewRotation = FQuat::Slerp(Rotation1.ToQuat(), Rotation2.ToQuat(), Alpha);

```

---

_[View the full topic](https://forums.unrealengine.com/t/need-help-with-fmath-lerp-frotator-and-setrelativerotation/143432)._
