From: Haravikk Mistral
Anyway, what I'm hoping to do is have the tail swish about when idle or moving, but I'm having difficult to find a way to do this reasonably smoothly.
I've done something like this myself, and I have a "working script". The method I used was to llTargetOmega the tail, then llSetPos and kill the Omega. The info you'll need is thus:
Get your starting and ending "swish" positions, in radians (keep the degrees around, they'll be useful). I could explain degrees and radians, but this page does it just fine:
http://secondlife.com/badgeo/wakka.php?wakka=radianLet's say, for the sake of example, you want to go from 45 degrees to -45 (315) degrees. In radians, that's PI / 4 to 7 * PI / 4. In LSL that's the aforementioned, or even 45 * DEG_TO_RAD to 315 * DEG_TO_RAD.
Next value we need to know is the time you want it to take to travel that arc. That's a 90-degree arc, or one forth of a loop. To make things easy, let's say one second. (That means it would take four seconds to make an entire circle)
Here's a timeout while I make sure llTargetOmega is understood.
------------
llTargetOmega(<0,0,1>, PI, 1.0);
The first part (<0,0,1>

is the direction. I recommend keeping it at value "1" for whatever direction you're rotating the tail in and only changing "PI" to change the speed.
The second part (PI) is the speed. PI is pi, or half the arc. PI_BY_TWO (I think that's the value for two pi) is a full loop in one second. PI / 10 would be a 10th of a loop in one second. (<0,0,1/10> or <0,0,0.1> without changing PI would give the same result, but is more confusing in this scenario)
The last part (1.0) is used for physical objects, which your tail is not. Leave it non-zero or I hear llTargetOmega won't work.
-------------
So to travel a PI / 4 arc in one second we will need llTargetOmega to use PI / 4 as the speed. (If we wanted it to take half a second, we would use PI / 2, etc)
After it travels that arc, we need it to stop, and then we need to set that position as the tail's new position -- because llTargetOmega is clientside, the tail never really moved. This can be done by doing something like this:
llSetRot(llGetRot() - llEuler2Rot(<0,0,90>

);
Or if the tail was already at ZERO_ROTATION, you set it to the new rotation like so:
llSetRot(llEuler2Rot(<0,0,315>

); (or hardcode the rotation so it doesn't have to do extra math)
And don't forget to stop the llTargetOmega or it will continue from the newly rotated spot.
Basically the script I'm talking about would look like this:
event()
{
// Tail is assumed to be at <0,0,45> rotation
llTargetOmega(<0,0,1>, PI / 4, 1.0); // Travel a quarter circle...
llSleep(1.0); // ... timed to one second.
llTargetOmega(<0,0,0>, 0, 0); // Stop the rotation
// Set tail to <0,0,315> rotation, which is where llTargetOmega
// should have put it after one sec.
llSetRot(llEuler2Rot(<0,0,315>));
}
Hopefully I've explained enough that you can do the math required for any other rotations you'd want to do. Please note that llSetRot() has a 0.2s built in scriptdelay. Your script will pause for roughly 0.2s after calling it, queuing any events that happen during that time. That is, if you kill llTargetOmega after calling llSetRot, you might get an additional 0.2s of clientside rotation.
Also, on busy sims, your timing is going to be all screwed up, and your tail may keep spinning without stopping, or go very very slowly then lurch into the new llSetRot, or whatnot.
Go ahead and contact me ingame if you have questions. I've been up entirely too late and I'm not sure how much of this made sense.