convert a LSL rotation of <0,0,0,0> to <0,0,0,1> and not <0,0,1,0> in SitTarget. Something seems to be doing that before this gets called, but just in case...

avinationmerge
UbitUmarov 2012-06-13 02:50:39 +01:00
parent 4027c8e9c9
commit b30c23eba4
1 changed files with 1 additions and 1 deletions

View File

@ -7099,7 +7099,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{ {
// LSL quaternions can normalize to 0, normal Quaternions can't. // LSL quaternions can normalize to 0, normal Quaternions can't.
if (rot.s == 0 && rot.x == 0 && rot.y == 0 && rot.z == 0) if (rot.s == 0 && rot.x == 0 && rot.y == 0 && rot.z == 0)
rot.z = 1; // ZERO_ROTATION = 0,0,0,1 rot.s = 1; // ZERO_ROTATION = 0,0,0,1
part.SitTargetPosition = new Vector3((float)offset.x, (float)offset.y, (float)offset.z); part.SitTargetPosition = new Vector3((float)offset.x, (float)offset.y, (float)offset.z);
part.SitTargetOrientation = Rot2Quaternion(rot); part.SitTargetOrientation = Rot2Quaternion(rot);