mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
normalize quats before applying llSetRot()
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user