jsantell / THREE.IK

inverse kinematics for three.js
https://jsantell.github.io/THREE.IK
MIT License
455 stars 54 forks source link

Maintaining Bone Position #19

Open JannisX11 opened 4 years ago

JannisX11 commented 4 years ago

I am looking to solve a bone chain where the direction and length of each bone is defined by the position of the child bone. I played around with the library and using the default settings it seemed to only use the Z axis for the bone and do the rest via rotation. This would make sense in most applications but I am trying to maintain the positions.

Example:

var bone_1 = new THREE.Bone();
var bone_2 = new THREE.Bone();
bone_2.position.set(2.5, 7, 1)
bone_1.add(bone_2);

Is there an option in this library to enable this, or, if not, do you think it could be added?