• All submissions to this site are governed by Second Life Project Contribution Agreement. By submitting patches and other information using this site, you acknowledge that you have read, understood, and agreed to those terms.
Issue Details (XML | Word | Printable)

Key: SVC-4447
Type: New Feature New Feature
Status: Open Open
Priority: Normal Normal
Assignee: Unassigned
Reporter: Strife Onizuka
Votes: 3
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
2. Second Life Service - SVC

llGetRootLocalRot

Created: 23/Jun/09 12:14 AM   Updated: 11/Sep/09 01:58 PM
Return to search
Component/s: Scripts
Affects Version/s: None
Fix Version/s: None

Issue Links:
Parent/Child
 


 Description  « Hide
rotation llGetRootLocalRot()
Returns the local rotation of the root prim of the attachment.

If the object is not attached, it should return the root prims global rotation.

Basically this function should call llGetLocalRot with the context of the root prim of the object.


llGetRootRotation is essentually a call to llGetRot with the context being the root prim of the object. From the root prim of an attachment, llGetRot returns a combination of the attachments local rot and the avatars rotation. (This design decision was made to make it easy to implement weapons; but that is another discussion).

Because of the quirks of PRIM_ROT, you need to know the root prims local rotation when updating a child prims rotation. For non-attached objects this isn't a problem, just call llGetRootRotation, but for attached objects this is a major problem.



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Jonno Stromfield added a comment - 11/Sep/09 01:49 AM - edited
I assume this is requesting the rotation of an attached root prim relative to the attachment.

I'm new to scripting, but I can't figure out how to move an attached object by a global co-ordinate offset (eg upward or northward) without something like this, or even the rotation of the attachment point. How can I compensate when the local position is given and set in the frame of the attachment but the local rotation is given and set in the frame of the avatar, so I have no idea of the position coordinate system I'm using?


Strife Onizuka added a comment - 11/Sep/09 01:58 PM
requesting the rotation of an attached root prim relative to the attach point.