Trying to solve the issues I have with rotation matrices and quaternions

Thanks for your reply!

I was looking for something like you said on forums, could you give me an example? How to add an rotation offset aka (x,y,z) translation to a quaternion, without coverting to a homogenous 4x4 matrix, to have a rotation around a point instead rotating the actor around its own center?

Maybe something like this snippet?



FQuat OrbitingActorOrientation = TempArr[Index]->GetOwner()->GetActorRotation().Quaternion;
FQuat OrientationQuat = FVector(
                                                          OrbitDataArr[Index].MajorOrbitRadius,
                                                          OrbitDataArr[Index].MajorOrbitRadius *
                                                          MajorEllipticOrbitFraction,
                                                          0.f
                                                     ).ToOrientationQuat() +
     FQuat(
                    FVector::UpVector,
                    FMath::DegreesToRadians(OrbitDataArr[Index].XYAngle)
     );
OrbitingActorOrientation *= OrientationQuat;
TempArr[Index]->GetOwner()->SetActorRotation(OrbitingActorOrientation);


EDIT: Doesn’t work this way, doesn’t rotate TempArr[Index]->GetOwner() around the BlackHoleLocation elliptically.