# How to rotate object based on multiple Vector3's

I have hero fbx and axe fbx, I wanna place axe in hero’s hand, hero can move and be rotated on every axis. I managed to get position of faces on heros hand during animation so axe is always on proper position, but I can’t figure out how to keep proper rotation on axe. I am completley new at graphics and have hard time understanding how quaternion works, sorry for my bad English.

const transformedSkinVertex = (skin, index) => {
let skinIndices = (new THREE.Vector4()).fromBufferAttribute(skin.geometry.attributes.skinIndex, index);
let skinWeights = (new THREE.Vector4()).fromBufferAttribute(skin.geometry.attributes.skinWeight, index);
let skinVertex = (new THREE.Vector3()).fromBufferAttribute(skin.geometry.attributes.position, index).applyMatrix4(skin.bindMatrix);

``````  let result = new THREE.Vector3();
let temp = new THREE.Vector3();
let tempMatrix = new THREE.Matrix4();
let properties = ['x', 'y', 'z', 'w'];

for (let i = 0; i < 4; i++) {
let boneIndex = skinIndices[properties[i]];
tempMatrix.multiplyMatrices(skin.skeleton.bones[boneIndex].matrixWorld, skin.skeleton.boneInverses[boneIndex]);
}

return result.applyMatrix4(skin.bindMatrixInverse);
}
const charObj = window.characters[0];
const meshIndex = charObj.model.children.findIndex(e => e.type === 'SkinnedMesh');

const frontLocalVertexR = transformedSkinVertex(charObj.model.children[meshIndex], 36402);
const backLocalVertexR = transformedSkinVertex(charObj.model.children[meshIndex], 35793);
const frontWorldVertexR = charObj.model.children[meshIndex].localToWorld(new THREE.Vector3(frontLocalVertexR.x, frontLocalVertexR.y, frontLocalVertexR.z));
const backWorldVertexR = charObj.model.children[meshIndex].localToWorld(new THREE.Vector3(backLocalVertexR.x, backLocalVertexR.y, backLocalVertexR.z));
const finRotationR = new THREE.Quaternion();
finRotationR.setFromUnitVectors(frontWorldVertexR, backWorldVertexR);
finRotationR.multiplyQuaternions(charObj.model.quaternion, finRotationR);
window.axe.quaternion.copy(finRotationR);
const fixedPositionR = new THREE.Vector3(0, -0.5, 0).applyQuaternion(finRotationR);