I have a weapon mesh attached to the “hand_r” socket of the UE5 default mannequin. It has a rotation/location offset to align it correctly. If I want to set a specific world rotation for the weapon, how do I calculate the hand_r rotation necessary to achieve that?
So the real answer is that UMeshComponent::GetRelativeRotation() returns the relative rotation from the bone. What I ultimately want is Q * R^-1, where Q is my desired world matrix for the mesh, and R is that GetRelativeRotation quaternion.
What was throwing me for a loop was that I was making Q by first build an FMatrix from three vectors that I was calculating with a few cross products… but had forgotten to normalize those cross products, and FMatrix::ToQuat() was returning an identity quaternion to me as a result.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.