First draft for control bones repositioning.
All bones marked as no deform are repositioned after the retarget based on their "linked" bone (linked bone is constraint owner if control bone is a target, parent bone if not). Arithb: Function to make a quat between two normalized vectors
This commit is contained in:
@@ -1335,6 +1335,18 @@ void NormalQuat(float *q)
|
||||
}
|
||||
}
|
||||
|
||||
void RotationBetweenVectorsToQuat(float *q, float v1[3], float v2[3])
|
||||
{
|
||||
float axis[3];
|
||||
float angle;
|
||||
|
||||
Crossf(axis, v1, v2);
|
||||
|
||||
angle = NormalizedVecAngle2(v1, v2);
|
||||
|
||||
AxisAngleToQuat(q, axis, angle);
|
||||
}
|
||||
|
||||
void AxisAngleToQuat(float *q, float *axis, float angle)
|
||||
{
|
||||
float nor[3];
|
||||
|
||||
Reference in New Issue
Block a user