Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Quick Question about setting Coordinates

Cirga Control
Registered User
Join date: 23 Aug 2005
Posts: 115
03-29-2006 14:08
I puchased an attachment and when I use the attachment it rezz's another prim (pose ball) for my partner to sit on. I can adjust the position of the ball through a notecard using the <0,0,0> coordinates.. however I cant seem to figure out how to find the position of the ball when I adjust it when it is centered off of my avatar. I know the coordinates displayed at the top of the screen cant be correct.

So my quesiton is.. when I am trying to position a prim that is centered off of my avatar.. how can I find the coordinates of where it is?

--------

Other question... if a coordinate consists of 4 numbers instead of just the normal 3.. what is the fourth number exactly?

Ex: coordinate <0,0,0,x> X = the fourth variable. Is that the rotation of the ball?

Thanks in advance.. pretty confused.. hope this makes sense.
Persephone Milk
Very Persenickety!
Join date: 7 Oct 2004
Posts: 870
03-30-2006 07:30
Cirga, I am not entirely sure I understand your question, but I can offer a few ideas. It is very likely that the coordinates in the note card are offsets and not world coords. If this is the case, to have the ball rez one meter higher than the default, you would change the vector in the note card to <0,0,1>. To have it rez one meter lower you would use <0,0,-1> I hope this helps.

Regarding your second question, a positional vector is always three floating point values, not four. There is no rotational component to a positional vector. If you find what looks like a four value vector, you are probably looking at a rotation. Rotations are specified as a quaternion consisting of four values. Understanding quaternions is difficult, but thankfully, the LSL gives us the ablity to specify our rotations as a 3-value vector (x, y and z rotatations) provided we then convert that vector into a quat:

CODE
vector eul = <0,0,45>; //45 degrees around the z-axis, in Euler form
eul *= DEG_TO_RAD; //convert to radians
rotation quat = llEuler2Rot(eul); //convert to quaternion
llSetRot(quat); //rotate the object
So, to answer your question, position and rotation are two different settings.
_____________________
~ Persephone Milk ~

Please visit my stores on Persenickety Isle
Musical Alchemy - Pianos, harps and other musical intruments.
Persenickety! - Ladies Eyewear, Jewelry and Clothing Fashions