Peeling Quartunions makes Me weep
|
Dominus Skye
Bug Magnet
Join date: 31 Oct 2004
Posts: 54
|
04-18-2005 11:28
Hi All, I have been attempting to follow this thread because it appears similar in nature to what I am trying to achieve. However no copious partaking of (insert your favourite substance here) has helped me to understand the question, let alone the answers. I need an object to rez another, a given distance to the "right" and "forward" of whichever way that object is rotated around the world Z axis, as well as a given distance "up" from that object. I'm guessing that because the rezzor object (the one which contains the llRezObject function) is itself at a non zero rotation that I first need to convert to world coordinates in order to specify the x, y, and z locations succesfully. I've tried to use something along the following lines: llRezObject("arrow", llGetPos()+<2,1,3>* (ZERO_ROTATION/llGetRot()) , <0,0,0>,<0,0,0,0>, 1); but this does not achieve what I want. (when I rotate the rezzor object around what in world terms would be the Z axis the rezzed item does not appear anywhere near where I would expect it to). I've spent a couple of days trying to adapt the various examples in the wikki and posts I have seen in this forum to no avail. I'd appreciate any assistance you can provide  Thanks, Dominus
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
04-18-2005 11:36
try rotation my_rot = llGetRot(); llRezObject("arrow", llGetPos()+(<2,1,3>*my_rot), <0,0,0>, my_rot, 1);
_____________________
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
|
Eggy Lippmann
Wiktator
Join date: 1 May 2003
Posts: 7,939
|
04-18-2005 11:44
You compound rotations with the multiplication operator, and remove/invert them with the division operator. I don't know what's so hard about that, really. Forget about that thread, there's no need to manipulate quaternion components directly, and no need to use ZERO_ROTATION anywhere. Think of a rotation as a rotation, and know that it will rotate a vector if you multiply them.
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
04-18-2005 12:24
Yes we are just being nerdy in the other thread.
_____________________
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
|
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
|
04-18-2005 14:31
From: Eggy Lippmann You compound rotations with the multiplication operator, and remove/invert them with the division operator. I don't know what's so hard about that, really. Forget about that thread, there's no need to manipulate quaternion components directly, and no need to use ZERO_ROTATION anywhere. Think of a rotation as a rotation, and know that it will rotate a vector if you multiply them. I think I just got called stupid. 
|
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
|
04-18-2005 14:47
From: Eggy Lippmann Think of a rotation as a rotation, and know that it will rotate a vector if you multiply them. And that the order of operations sometimes matters. 
_____________________
---
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
04-18-2005 15:25
"Quaternions are the things that scare all manner of mice and men. They are the things that go bump in the night. They are the reason your math teacher gave you an F. They are all that you have come to fear, and more. Quaternions are your worst nightmare." -- Confuted
_____________________
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
|
Dominus Skye
Bug Magnet
Join date: 31 Oct 2004
Posts: 54
|
TY TY TY TY TY TY TY TY TY TY TY TY TY * <1,1,1,1>
04-18-2005 15:50
I won't have a chance to test this fully until I get back from working in a couple of days, but the limited testing I was able to do before I left seems to indicate this function should work nicely  I really appreciate the assistance Dominus
|