I am just refactoring some code I prototyped in Blueprint to C++. I have an ImpactNormal that I want to break the Vector Z and Make a Rotator from.
Is this code correct?
FVector ImpactNormal = HitResult.ImpactNormal;
FRotator RotZ = FRotator(ImpactNormal.Z);
Also ran across this:
#include “Kismet/KismetMathLibrary.h”
FRotator RotZ = UKismetMathLibrary::MakeRotFromZ(ImpactNormal);
Are they the same or doing different things?
Edit: Nevermind I answered my own question. I dove into the source code looks like its getting a safe normal then doing a CrossProduct then returning FMatrix