normalize quaternion.Slerp outputs

avinationmerge
UbitUmarov 2012-10-10 01:37:59 +01:00
parent 8fa91686db
commit d554c0d574
2 changed files with 2 additions and 0 deletions

View File

@ -575,6 +575,7 @@ namespace OpenSim.Region.Framework.Scenes
Quaternion current = m_group.GroupRotation; Quaternion current = m_group.GroupRotation;
Quaternion step = Quaternion.Slerp(m_currentFrame.StartRotation, (Quaternion)m_currentFrame.Rotation, complete); Quaternion step = Quaternion.Slerp(m_currentFrame.StartRotation, (Quaternion)m_currentFrame.Rotation, complete);
step.Normalize();
/* use simpler change detection /* use simpler change detection
* float angle = 0; * float angle = 0;

View File

@ -5202,6 +5202,7 @@ namespace OpenSim.Region.Framework.Scenes
} }
Quaternion rot = Quaternion.Slerp(RotationOffset,APIDTarget,1.0f/(float)m_APIDIterations); Quaternion rot = Quaternion.Slerp(RotationOffset,APIDTarget,1.0f/(float)m_APIDIterations);
rot.Normalize();
UpdateRotation(rot); UpdateRotation(rot);
m_APIDIterations--; m_APIDIterations--;