jsantell / THREE.IK

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

Hinge Constraints #12

Open sneha-belkhale opened 5 years ago

sneha-belkhale commented 5 years ago

@jsantell - so as I mentioned in #3 , here is an implementation of hinge constraints along with an example of how to use them.

Currently the usage is very similar to the IKBallConstraint -- the IKHingeConstraint accepts a maximum angle as a parameter, and the axis of rotation is determined by the starting orientations of the bones.

Few things on the todo list are adding a minimum angle parameter, as well as another parameter for flipping the rotation axis.

I've tested it successfully with 3 models -- looking forward to your thoughts on the implementation :)

Kif11 commented 5 years ago

@jsantell can you please review this MR. I'm working on a project and it will be useful to have hinge constrains on our characters with IK systems.

arpu commented 5 years ago

@jsantell anything is needed here?

jsantell commented 5 years ago

Hello! A few more things to make it possible to merge:

Sorry for the slow response! and great work :smile: