Hi everyone!
Im have a 9 floats representing a 3x3 rotation matrix from another software (Nuitrack), is there any way to make a Rotator object from this matrix?
Thanks.
Hi everyone!
Im have a 9 floats representing a 3x3 rotation matrix from another software (Nuitrack), is there any way to make a Rotator object from this matrix?
Thanks.
FQuat UNuitrackUtils::OrientToRotation(Joint joint)
{
//auto jointRight = FVector(-joint.orient.matrix[0], joint.orient.matrix[6], joint.orient.matrix[3]); //X(Right)
auto jointForward = FVector(-joint.orient.matrix[1], joint.orient.matrix[7], joint.orient.matrix[4]); //Y(Forward)
auto jointUp = FVector(-joint.orient.matrix[2], joint.orient.matrix[8], joint.orient.matrix[5]); //Z(Up)
return FRotationMatrix::MakeFromYZ(jointUp, jointForward).ToQuat();
}