From: Hg Beeks
My guess would be that the problem stems from using global (absolute?) rotations for the object itself, and not the avatar.
Hmn...
For yuks, here's the script.
Mari
string actionText = "Rock";
string inactionText = "Stop";
integer swingRate = 1; // can only rotate about every 10 seconds actually
float swingDegrees = 0.15;
integer swinging;
integer position;
rotation rotNorm;
rotation rotBack;
rotation rotForth;
key avatar;
init()
{
swinging = FALSE;
rotNorm = llGetRot();
rotBack = rotNorm * <0, swingDegrees, 0, 1>;
rotForth = rotNorm * <0, -(swingDegrees), 0, 1>;
llSetTouchText(actionText);
}
swingNorm()
{
llSetTimerEvent(0.0);
llSetRot(rotNorm);
}
swingBack()
{
llSetRot(rotBack);
position = 1;
}
swingForth()
{
llSetRot(rotForth);
position = 0;
}
default
{
state_entry()
{
init();
llSitTarget(<0.92943, -0.00386, -0.34782>, <0.00000, 0.69466, 0.00000, 0.71934>

;
}
changed(integer change)
{
if(change & CHANGED_LINK)
{
avatar = llAvatarOnSitTarget();
if(llAvatarOnSitTarget() != NULL_KEY ) //sitting
{
llRequestPermissions(avatar,PERMISSION_TRIGGER_ANIMATION);
llStopAnimation("sit"

;
llStartAnimation("Ride rocker"

;
swinging = TRUE;
swingForth();
llSetTimerEvent(swingRate);
}
else //not sitting
{
llStopAnimation("Ride rocker"

;
swinging = FALSE;
}
}
}
timer()
{
if (swinging==FALSE)
{
swingNorm();
}
else if (position==0)
{
swingBack();
}
else
{
swingForth();
}
}
}