- Home /
Animator Controller Changes Bone Manipulation Results by Script
I'm currently working on IK script. I need to use generic model, so I can't use Mecanim IK. Here's my code.Gist
I'm facing a problem that when I attach Animator Component (with proper Animator Controller and Avatar)to the 3D model, IK script does not work correctly. Without Animator, the result is as expected.
However, with Animator attached, IK result changes and doesn't work correctly. The result is shown in figure below. (took on the same condition as previous picture except that Animator is active.)
I can't figure out why whether Animator Component is attached or not affects the result of IK.
What is the cause of this problem?
Answer by vestalis · Sep 16, 2017 at 01:09 PM
I found that Animator Controller resets bone transform values (position, rotation, local position and local rotation) every frame. Because of that, solver function can't use calculation result of previous frame, which impaired accuracy.
I modified script so that solver function can use result of previous result (see gist), and it works well so far.
Your answer
Follow this Question
Related Questions
Modifying animation in Late Update not working 1 Answer
2D Animation does not start 1 Answer
Why is my Ik not working 0 Answers
Animate an Object by letting it play out in when I press play? 0 Answers
My player won't jump? 1 Answer