Make llGetObjectDetails() return the correct world rotation for a sitting avatar

This addresses http://opensimulator.org/mantis/view.php?id=6567
This creates a ScenePresence.GetWorldRotation() with the same semantics as SOP.GetWorldRotation()
SP.Rotation can't be used since it's relative to the sat upon prim if the avatar is sitting.
This commit is contained in:
Justin Clark-Casey (justincc)
2013-03-14 21:23:48 +00:00
parent 9fad90a914
commit e9c394fb4e
2 changed files with 36 additions and 6 deletions

View File

@@ -10518,7 +10518,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
ret.Add(new LSL_Vector((double)av.AbsolutePosition.X, (double)av.AbsolutePosition.Y, (double)av.AbsolutePosition.Z));
break;
case ScriptBaseClass.OBJECT_ROT:
ret.Add(new LSL_Rotation((double)av.Rotation.X, (double)av.Rotation.Y, (double)av.Rotation.Z, (double)av.Rotation.W));
ret.Add(new LSL_Rotation(av.GetWorldRotation()));
break;
case ScriptBaseClass.OBJECT_VELOCITY:
ret.Add(new LSL_Vector(av.Velocity.X, av.Velocity.Y, av.Velocity.Z));