# There is any way to slerp in c++ like unity?

**URL:** <https://forums.unrealengine.com/t/there-is-any-way-to-slerp-in-c-like-unity/1167340>\
**Category:** C++\
**Tags:** unreal-engine, question\
**Created:** [May 16, 2023, 8:25am UTC](https://forums.unrealengine.com/t/there-is-any-way-to-slerp-in-c-like-unity/1167340 "2023-05-16T08:25:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RuuNee1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RuuNee1](https://forums.unrealengine.com/u/RuuNee1)\
**Post date:** [May 16, 2023, 8:25am UTC](https://forums.unrealengine.com/t/there-is-any-way-to-slerp-in-c-like-unity/1167340/1 "2023-05-16T08:25:29Z")

</div>

I want slerp A acotr to B actor.  
But It dosen`t work.

I find realy hard but all code dosent` work.

somebody pls help me

---

<div class="post-metadata">

**Author:** ![Ares9323](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ares9323/32/1194521_2.png) [@Ares9323](https://forums.unrealengine.com/u/Ares9323)\
**Post date:** [May 16, 2023, 10:17am UTC](https://forums.unrealengine.com/t/there-is-any-way-to-slerp-in-c-like-unity/1167340/2 "2023-05-16T10:17:41Z")

</div>

Spherical linear interpolation in Unreal uses quaternions, not vectors, you can convert your vectors to FQuat and use [FQuat::Slerp](https://docs.unrealengine.com/5.0/en-US/API/Runtime/Core/Math/FQuat/Slerp/).

Otherwise, you can look at [this post](https://forums.unrealengine.com/t/there-is-any-way-to-do-a-slerp-between-two-fvectors/381560).
