Rotation doesn't work correctly

Hello, i trying to Rotate mesh in Pitch axis, but instead it rotates in Yaw axis. What i’m doing wrong? Help, please, because i can’t find answer by myself. Thank you!
P.S.: I tried to find answer, but failed, so i will wait for your answers.

i’ve been trying different functions but all them causes same behavior - actor rotates on Yaw axis. I don’t know what is wrong. Because all Location and Rotation is same as blueprint version and in blueprint subclass of AcppPlayer

You set the Yaw to -180 in your constructor. In the SpawnAnimation method you are then lerping the Yaw value to 0.0. If you want to only change the pitch, you need to send the original Yaw value in SetRelativeRotation:

PlayerMesh->SetRelativeRotation(FMath::Lerp(SpawnRotation, FRotator(AnimationPitch + Pitch, -180.0f, 0.0f)), Value));


PlayerMesh->SetRelativeRotation(FMath::Lerp(SpawnRotation, FRotator(AnimationPitch + Pitch, SpawnRotation.Yaw, SpawnRotation.Roll)), Value));

Okay, It’s not rotating on Yaw now and…not rotating at all. AnimationPitch = 720.0f; - So it must rotate 3 times in Pitch, but it’s not. So it seems i can’t rotate PlayerMesh in C++ even if i set mobility to Movable (But in blueprints i can do it easy).

Euler angles don’t wrap. 720 degrees rounds out to 0.

Either perform the rotation in smaller increments (multiple lerps to < 90), or switch to using quaternions.

Thank you! It working with <90 values, now i need to learn Quaternions