As per the LL grid, for attachments make llGetObjectDetails() OBJECT_ROT return the avatar's rotation.
This is already the behaviour of OBJECT_POS. Partially satisfies http://opensimulator.org/mantis/view.php?id=7177bullet-2.82
parent
a02dae566c
commit
0cc3cdfb4e
|
@ -11313,17 +11313,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
ret.Add(new LSL_Vector(obj.AbsolutePosition.X, obj.AbsolutePosition.Y, obj.AbsolutePosition.Z));
|
||||
break;
|
||||
case ScriptBaseClass.OBJECT_ROT:
|
||||
{
|
||||
Quaternion rot = Quaternion.Identity;
|
||||
Quaternion rot = Quaternion.Identity;
|
||||
|
||||
if (obj.ParentGroup.IsAttachment)
|
||||
{
|
||||
ScenePresence sp = World.GetScenePresence(obj.ParentGroup.AttachedAvatar);
|
||||
|
||||
if (sp != null)
|
||||
rot = sp.GetWorldRotation();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (obj.ParentGroup.RootPart == obj)
|
||||
rot = obj.ParentGroup.GroupRotation;
|
||||
else
|
||||
rot = obj.GetWorldRotation();
|
||||
|
||||
LSL_Rotation objrot = new LSL_Rotation(rot);
|
||||
ret.Add(objrot);
|
||||
}
|
||||
|
||||
LSL_Rotation objrot = new LSL_Rotation(rot);
|
||||
ret.Add(objrot);
|
||||
|
||||
break;
|
||||
case ScriptBaseClass.OBJECT_VELOCITY:
|
||||
ret.Add(new LSL_Vector(obj.Velocity));
|
||||
|
|
Loading…
Reference in New Issue