Topic was automatically imported from the old Question2Answer platform.
Asked By
Wild Western
I have created my own Two Bone IK Solver system for 3d skeletons that works well with no noticeable bugs. However there is no system in place to orientate the bone chain so that the “elbow” or “knee” looks at a point in 3d space. I have only done some testing here and there to get a system to no avail and was wondering if anyone had done this or know of any idea on how to get one working. This project is done in C# but I can translate C++ or GDScript to C# just fine so any code snippets are accepted if you are willing to provide.
Sorry for the miss communication unfortunately. This is my own ik solver and not the built in one, so I am asking as to how the magnet works in say the SkeletonIK node, but you reminded me I can look at source.
edit* It seems as if the solver solves the chain with the magnet in mind using interpolation so I’m still not sure how to do this with Law of Cosigns
I have completed it myself and will post a link to a github in a few days on how I did it.
I stole a method from unity SignedAngle and used a Plane to determine the rotation around my arm normal given the projected points of my elbow and my magnet.