I have a script that I am trying to use in some furniture. It has a nice smooth glide to it but has a few problems.
I need a script that will turn direction relative to the root prim and not drift.
Actually I would like this script to do that ...the smooth glide is exactly what I want just need help figuring out how to correct the other problems ....the drifting and turning direction relative to the root prim.
Here is the contents of the script .....
float iDir = .01;
integer iSwing = 0;
default
{
state_entry()
{
llSetTimerEvent(3);
}
touch(integer total_number)
{
if (iSwing == 0)
{
iSwing = 1;
}
else
{
iSwing = 0 ;
}
}
timer()
{
if (iSwing==1)
{
if (iDir == .01)
{
iDir = -.01;
}
else
{
iDir = .01 ;
}
llTargetOmega(<0,iDir,0>,PI,2.0);
}
else
{
llTargetOmega(<0,0,0>,PI,2.0);
}
}
}
Any suggestions or ideas on how to get the effect I need with this?
Thanks in advance

;