Mirror a FRotator along a plane

I have a FRotator and want to mirror it along a plane. The plane is represented by a normal vector.
How do I achieve that?

From an unity answer talking about UE4

var objectQuat; // from world rotation
var mirrorNormalQuat = new Quaternion(plane.x, plane.y, plane.z, 0);

var reflectedQuat = mirrorNormalQuat * objectQuat * mirrorNormalQuat;

i’m not sur if the plane is represented by it’s normal here, but i guess you can give it a try

edit: according to this plane is indeed represented by it’s normal

thank you for your answer. I’ve tried it using this code:


FQuat mirrorNormalQuat = FQuat(normal.X, normal.Y, normal.Z, 0);
FQuat reflectedQuat = mirrorNormalQuat * paramRot.Quaternion() * mirrorNormalQuat;

resultRotation = reflectedQuat.Rotator();

the result is a rotation just pointing upward. Is there maybe something wrong with this code? (just using the paramRot as rotation works as expected)

alright never mind the code works now perfectly fine. there were just a few other problems I had to fix.