So I'm trying to put pedals on a bicycle. I know, I know, bad plan to start with. But I'm honestly not all that picky! I've got the timing of the llTargetOmega synced up with the animation enough that I'm happy with it. I dont care where on the circle it is when they stop, because they will stop pedaling at a random time. All I want is a simple llSetRot back to the original position when I turn it off. I'm fine with jumping or jerking or doing the watoosi, as long as it gets there. But instead it just seems to stop wherever the llTargetOmega had it stop and do nothing else. I've poked at it and pulled at it and boiled it down to a touch_start to try to get it to work - here's that version
CODE
integer SWITCH;
rotation STARTROT;
default
{
on_rez(integer startparam)
{
SWITCH = FALSE;
STARTROT = llGetRot();
}
touch_start(integer total)
{
if(SWITCH == FALSE)
{
llTargetOmega(llRot2Left(STARTROT), TWO_PI, 1.0);
SWITCH = TRUE;
}
else if (SWITCH == TRUE)
{
llTargetOmega(llRot2Left(STARTROT), 0.0, 1.0);
SWITCH = FALSE;
llSetRot(STARTROT);
}
}
}
Thanks so much in advance!
Seagel Neville