Skip to main content

fabrik_solve

fabrik_solve(joints, lengths, origin, target, [max_iterations], [distance_tolerance])

Kind: global function

ParamTypeDescription
jointsArray.<Transform>
lengthsArray.<number>distance to next bone
originVector3where should the first joint be placed at
targetVector3where should the last joint be placed at
[max_iterations]numberMore steps will lead to higher accuracy, but at the cost of computation. Generally solution will be reached in just a few iteration so this is just a ceiling
[distance_tolerance]numberMinimum squared distance to be achieved to the target, used to terminate earlier before maximum number of iterations is reached