diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 5b6f23a8c1..519dd2bfeb 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -347,7 +347,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // convert a LSL_Rotation to a Quaternion 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.