I have to ask.
How do I get a rotation in degrees, i.e. rot1=45 ( a line in the notecard)
I need to convert 45 degrees (rot1) in the script so it rotates a texture.
float rot1;
command() {llSetPrimitiveParams([PRIM_TEXTURE, side1, tex1, reps1, offs1, rot1,PRIM_COLOR, side1, col1, a1]); return; }
if ("rot1" == item) { rot1 = (float )value;return; }
some incarnations I have tried.
// rotation rot1a = rot1 * DEG_TO_RAD);
// Rotation, in degrees.
//vector rot1 = <0, 0, 0>;
//vector rot1 = DEG_TO_RAD;
//float radians = (rot1 * DEG_TO_RAD);
// Convert degrees to radians.
//(float)(( rot1) * DEG_TO_RAD)
//rot1 = ;
I get errors about syntax with the multiplyer * all the time although all the examples I look at have the multiplyer. Otherwise I have to keep putting 1.59609blah into the notecard. Customers don't like this.
This has taken a very long time for me and I just don't get it.
Another question:
I get a prim rotating with llTargetOmega(). It says in wiki that as a child prim it will rotate around local axis. (Say an angled prop on an airplane). But once linked, it does not seem to do that. Should I be using another function or do you mix the rotations somehow?
Thanks, I only ask as a LAST resort as I just can't get these to work.