Why is my rotation saved when jumpping off a spline?

When I jump off of a spline, the character readopts its rotation upon entering the spline instead of the rotation it had when attaching to the spline.

Here is a gif of the problem: Screen capture - f7e0e984c416c70f15f5df069c0caa94 - Gyazo

I can’t figure this out for the life of me. I’ve tried turning everything off to diagnose the problem and still can’t figure out why it’s happening. I’m thinking now that it maybe has something to do with the native Jump() function but I’m not sure how to even begin to approach that potential issue.

Any insight or suggestions would be appreciated. Code found below.

Upon jumping off you need to set the new rotation to you controller

if (APlayerController* PlayerController = Cast<APlayerController>(Controller))
{
   FRotator newRotation= UKismetMathLibrary::MakeRotFromX( Y-X )
   PlayerController->SetControlRotation(newRotation)
}

Where
FRotator newRotation would be a rotation from X from the direction of the last two points closest to the player upon jumping subtracted from each other.
ski

Setting the control rotation did the trick, seems I have some homework to do on the unreal player controller. Thank you.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.