Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

RezObject ... rotation incorrect HELP !

Zermes Vindaloo
Registered User
Join date: 30 Aug 2004
Posts: 14
10-30-2005 15:04
alright, so i am fiddling around with a zany idea, a box that rezzes around you and can either TP you away, or drop you to a secret room. 1 prim is rezzing correctly in the correct Rot, however the 2nd prim is not, and I just dont get it. here are the 2 Rez lines currently in the script, the "1Back" object positions correctly, but the "1Right" does not...

llRezObject("1Back", llGetPos() + <0,1,0>,ZERO_VECTOR,<180,0,180,1>,0);
llRezObject("1Right", llGetPos() + <1,0,0>,ZERO_VECTOR,<0,180,0,1>,0);

if one were facing the rezzing object, the 2nd prim should face long ways left to right
((its a 3meter by 2 meter plank, the 3meter should be left to right))

On rez it does not face that way, it faces the same as the 1st prim, which is correctly placed. Reason the Rot is important is because of movement of the rezzed prims, to give the effect of folding up around you.

IF ANYONE is in world at this time, which is Sunday 3pm game time, I am there, its almost a must see to understand correctly my dilema. Thanks in advance

Z
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
10-30-2005 19:47
You should know much about rotation. Quaternion is too hard for me to understand and put down digits directly.

Use "llEuler2Rot(<x, y, z> * DEG_TO_RAD)" for the rotation.
_____________________
:) Seagel Neville :)
Padraig Stygian
The thin mick
Join date: 15 Aug 2004
Posts: 111
10-30-2005 22:39
Rotations are not vectors. Each of the first three numbers spreads 90 degrees across the space between 0 and 1. The fourth number affects the side of the grid it rotates on.

Thus:

<0.0,0.0,0.0,1> is 0 degrees
<1.0,0.0,0.0,1> is 90 degrees X
<0.0,0.0,0.0,-1> is 180 degrees X
<1.0,0.0,0.0,-1> is 270 degrees X

I hope that helps.
_____________________
(You): Aww! My pants won't rez! Does this texture look okay on me?

Incidental Radio :: Because nothing is by design
Now featuring Torley-tastic technomusic!
Zermes Vindaloo
Registered User
Join date: 30 Aug 2004
Posts: 14
10-30-2005 22:50
Hey thanks, I was contacted by a resident, who gave me a script that tells the rotation of a prim, and it helped ALOT, though i WAS reading it as Vector and not Quaternion
(( spelling)) the script did the trick. Everything rezzes correctly now.
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
10-30-2005 23:07
From: Padraig Stygian

<0.0,0.0,0.0,1> is 0 degrees
<1.0,0.0,0.0,1> is 90 degrees X
<0.0,0.0,0.0,-1> is 180 degrees X
<1.0,0.0,0.0,-1> is 270 degrees X



Thats not right

<1.0,0.0,0.0,0.0> is 180 degrees X

<0.0,0.0,0.0,-1> is inverted zero
_____________________
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
Padraig Stygian
The thin mick
Join date: 15 Aug 2004
Posts: 111
10-31-2005 11:00
Thanks, Strife. I'm not completely clear on rotations, but most days I get it right on the first try. :)

And *wow* that was a stupid one to biff... ::shakes head::
_____________________
(You): Aww! My pants won't rez! Does this texture look okay on me?

Incidental Radio :: Because nothing is by design
Now featuring Torley-tastic technomusic!