When i use Quaternion.FromToRotation at certain rotation my object starts slowly spinning for some reason.
bones[i].rotation = Quaternion.FromToRotation(Vector3.up, bones[i + 1].position - bones[i].position) * Quaternion.Inverse(bone_start_rot[i]);
I looks like some kind of crap like gimbal lock or idk what but i know that quaternions don’t suffer from that, yet at some rotation it just starts randomly spinning. I could post the whole code but it is very long and really hard to understand out of context. Did anyone encounter such problem?
I can remove " * Quaternion.Inverse(bone_start_rot*); "* at the end but that doesn’t change anything so the problem is clearly in FromToRotation.