MakeRotationFromAxes gives me wrong results

anonymous_user_10c65d79
Sun, 23 Sep 2018 15:37:05 +0000
C++

Hello everyone,
I’m trying to calculate a new reference system based on a normal vector. This appears to be more complicated than I thought and I think I am stuck because of a potential bug with MakeRotationFromAxes or FMatrix (but I could be using it wrong).

In short if I try to get this rotator:

		rotation = UKismetMathLibrary::MakeRotationFromAxes(-FVector::ForwardVector, -FVector::RightVector, -FVector::UpVector);

I expect it to be upside down, something like this:

 {Pitch=0.000000000 Yaw=180.000000 Roll=180.000000000 }

but I get this:

{Pitch=0.000000000 Yaw=180.000000 Roll=0.000000000 }

that is simply facing back but not upside down.
Am I missing something basic? The problem is easily reproduceable (in the pictures I am using the base cone in unreal).

Thank you in advance for your help,

5 posts - 1 participant