To attach object to hand, they usually adjsut position of this object and simply use two commands:
Object->AttachToComponent(AvatarMesh, Name_Of_Hand_Bone)
Object->SetRelativeTransform(Transform_To_Fit_In_Hand)
If you want to adjust position of the hand, don’t add “Transform Bone” node. Instead, add this offset to “Position Right Hand” and use it within “Two Bone IK” node.
There are few useful functions to operate transforms:
- ComposeTransforms (A, B). Adds A to B (order matters). In your case, Compose Transforms (RAttachSocket, PositionRightHand).
- ConvertTransformToRelative(…) - opposite operation. Note, names of parameters are confusing
- InverseTransform - obvious. I’m not sure how it works in you project, so, msy be, you’d need to inverse RAttachSocket before composing it with PositionRightHand.