Can i use custom IK solution with playcanvas?

I want to be able to do IK solving on a rig.
Using the following examples, am i able to apply either solution on PlayCanvas?

http://lo-th.github.io/fullik/

I know they both use ThreeJS but i dont have any clue on where to begin.

Thanks

You could probably modify that fullik library to work with PlayCanvas. You would probably need to modify files like Geom.js which creates threejs vectors to use PlayCanvas vectors. But it might be simple.

Alternatively, you are probably looking to solve “2 bone IK” (which is simpler than the general case of lots of bones).

The Cat demo does this in Cat.js: https://s3-us-west-2.amazonaws.com/s.cdpn.io/264161/Cat.js in the getAngles method.

In PlayCanvas you can import a model with a skeleton and use an IK solver to position the bones of the skeleton easily. The problem is the IK solver :smiley:

Any news on a IK solver for rig? If you can get a Playcanvas example to work along the premise of https://gist.github.com/Farfarer/3891630 , then that would be good. Unforatunetly, i’m not even sure this particular code works in Unity as well. Lol… But you get the idea, i just want to have a working simple 2 bone IK solver ( Thigh, Calve, to deemed foot destination…) to ensure the character foot aligns with terrain slope/3d environment and the limbs in between to rotate correctly accordingly.