normalize quats before applying llSetRot()

0.6.6-post-fixes
Dahlia Trimble 2009-05-21 19:44:20 +00:00
parent 8e6289b8ca
commit 3d0f110f21
1 changed files with 3 additions and 1 deletions

View File

@ -347,7 +347,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
// convert a LSL_Rotation to a Quaternion // convert a LSL_Rotation to a Quaternion
private Quaternion Rot2Quaternion(LSL_Rotation r) private Quaternion Rot2Quaternion(LSL_Rotation r)
{ {
return new Quaternion((float)r.x, (float)r.y, (float)r.z, (float)r.s); Quaternion q = new Quaternion((float)r.x, (float)r.y, (float)r.z, (float)r.s);
q.Normalize();
return q;
} }
//These are the implementations of the various ll-functions used by the LSL scripts. //These are the implementations of the various ll-functions used by the LSL scripts.