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
It will work, but just bear in mind that you can control what the rotation ‘around’ the Normal Z axis will be (you need two vectors to force orthogonality). Most of the time though that’s not a concern, especially if you’re just spawning FX or something.
If you want to skip having to include the Kismet Math Library, you can just do this: