I’m having an issue with bones!
I’m trying to lock the camera to my root bone to be a first person camera, and I’ve verified that skeleton.bones is my root bone from as I see it in Blender. I set the camera and red/green (blue is not visible in this view) axes to it like this:
model_1.children.children.skeleton.bones.updateWorldMatrix(); //to update position? var p = new THREE.Vector3(); var q = new THREE.Quaternion(); var s = new THREE.Vector3(); model_1.children.children.skeleton.bones.matrixWorld.decompose(p, q, s); //sets by reference camera.position.x = p.x; camera.position.y = p.y; camera.position.z = p.z + 1; //to move camera backward axesHelper.position.x = p.x; axesHelper.position.y = p.y; axesHelper.position.z = p.z; requestAnimationFrame( animate ); var delta = clock.getDelta(); if ( mixer ) mixer.update( delta ); renderer.render( scene, camera );
However, I want it to lock to where all the bones converge here:
But it definitely seems like the faster the skeleton moves, the further away this center point gets from my axes. The axes act as some weird local origin, they aren’t moving correctly, almost like the 0,0,0 of the actual root bone. Does anyone know how to get the position of where these lines intersect?
Look how far away the converged line point gets from the axes I placed at bones in this video: