normalize quats before applying llSetRot()
parent
8e6289b8ca
commit
3d0f110f21
|
@ -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.
|
||||||
|
|
Loading…
Reference in New Issue