UKismetMathLibrary::VLerp question

Hi…

Math Library make us life easier, i know VLerp permits interpolate between two FVector elements… but FVector is used to move an actor only… i guess the purpose for VLerp is general… so it should somehow works with FRotator too… for instance interpolate a rotation between 0, 150, 60 to 10, 180, 100 …

…problem is that FVector is not an FRotator even if they have 3 floats…
is there a way to convert it ?

thanks.

Edit: I found the solution:

FVector::Rotation() returns the rotation values…
FRotator::Vector() returns the vector values from rotation…

Thanks anyway…

Converting between vectors and rotators may sometimes give you wrong results, and lerping between rotators sometimes behaves weird since FRotators use Euler rotations.
Anyways, there’s RLerp function for rotators in KismetMathLibrary as well, you can use that for FRotators.
But the default FMath::Lerp() works too; more so, it also works with FQuats.

1 Like

Btw, you can use RInterp.

2 Likes

thanks!