TheComet / ik

Minimal Inverse Kinematics library
MIT License
496 stars 71 forks source link

the algorithm is diffcult to use #19

Open lvZic opened 1 year ago

lvZic commented 1 year ago

the doc is poor and hard to understand, and there is little example code. the code crash after 2 or 3 frames loop. I wonder how to set each frame input and get each frame output? what the MyGameNode mean in doc? If i should create another tree named MyGameNode?

TheComet commented 1 year ago

MyGameNode is your own code. I'm assuming you have a game engine that has its own node tree. So if this is true, then you have to copy the positions and rotations from your game into an identical structure of ik_node_t, solve, then copy the data back into your game.

If you want to use ik_node_t structures directly for the rest of your application you can do that too. Then you wouldn't need to do any copying, but then you are depending on IK structures, which is probably not a very good idea from a design point of view.