- Home /
Computing a transform between two poses and applying it to another pose.
I'm hoping someone can help me check my math.
I have an item pose that was transformed, and I want to find a transformation that transforms the hand the same way the item was transformed. itemPose
is the old item pose and influencePose
is the new item pose. gripPose
is the pose to which I want to apply the delta transformation.
// move hand in accordance with item movement
var gripPose = poseHand.gripPose;
var gripPositionOffset = influencePose.position - itemPose.position;
var gripRotationOffset = itemPose.rotation * influencePose.rotation.Inverse();
var gripOffset = Matrix4x4.TRS(gripPositionOffset, gripRotationOffset, Vector3.one);
var gripPose2 = new Pose(gripOffset.MultiplyPoint3x4(gripPose.position), gripRotationOffset * gripPose.rotation);
poseHand.SetGripPose(gripPose2, currentFTKHandPose, false);
I would look at @Bunny83's answer to a similar question, here: http://answers.unity.com/answers/1609237/view.html
Your answer
Follow this Question
Related Questions
Retrieve 2d primitives from 3d colliders 1 Answer
3D. How to get 1 pixel to equal 1 degree camera FOV 0 Answers
Calculate collision between 2 rotated boxes without using BoxCollider (MATH) 2 Answers
How to scale/calculate GameObject Z distance to the real physical world... 0 Answers
Create a straight gradient equation with a grid of 3d objects 1 Answer