Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Global rotation of attached object

Ace Cassidy
Resident Bohemian
Join date: 5 Apr 2004
Posts: 1,228
06-29-2004 05:34
I've been struggling with the question of how to determine the rotation (relative to the global axes) of an object that is attached to an AV. Perhaps someone can point me in the right direction here.

Suppose I have an attachement and I want that attachment to "push" a particle burst along the attachment's up axis, from whatever rotation the object currently has.

Now.... since the object is an attachment, I can get the current rotation of the AV via llGetRot(). And I can get the rotation of the object, relative to its root AV via llGetLocalRot(). And I can even combine the two, and direct the particle burst by :

push = llRot2Up(llGetRot() * llGetLocalRot()) * PUSH_FACTOR;

This seems to do the trick, so long as the attachment point is a point that always rotates exactly with the AV.

But if the attachment is a limb, or the head, which can move independently of the root AV through animations, I can't seem to find the rotation of the object (relative to the global axes). The above calculation will not change the return value of llGetRot(), because during an animation the AV hasn't rotated, only the limb has.

Any suggestions as to how I can determine the global rotation of such an attached object?

- Ace
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
06-29-2004 10:25
animations are all client side. To Havok & LSL you are just an object, made of a few prims; the prims never move except as a group.

if you could i would have relayed the data to giant robots so they could battle. It would have been so much fun ^_^
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Ace Cassidy
Resident Bohemian
Join date: 5 Apr 2004
Posts: 1,228
06-29-2004 11:09
that sucks...

*tosses his "animated severed limb" idea in the trashcan*

;-)

- Ace
Rysidian Rubio
Ruby Red Head
Join date: 14 Jan 2004
Posts: 263
06-29-2004 18:37
you could always create an animation that moves your arm 'inside' your avatar's body so it looks detatched, and create a prim 'severed arm' to fall to the ground and spew forth blood (if that's what you were thinking).

Just a suggestion...