Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

mysterious moving object

Pedro Pendragon
Registered User
Join date: 15 Jan 2004
Posts: 77
05-31-2004 19:20
i have a window-shutter script on a cut box prim, fairly simple: just llSetRot()s the shutter open or closed. as i was sitting at the build screen just thinking about what to do next, i absently clicked the shutter several times, watching it swing open and shut. then, the prim started 'walking'. it would shift about 1/2 meter in the +y direction on some (random, as far as i can tell) clicks.

here's the script i wrote:
CODE

float OPEN=1.570796;
float CLOSED=0;

integer status=1;

switchState()
{
float target=CLOSED;
status = !status;
if(status)
target=OPEN;
llSetRot(llEuler2Rot(<0, 0, target>) * llEuler2Rot(<0, 0, 1.570796>));
}

default
{
state_entry()
{
switchState();
}

touch_start(integer total_number)
{
switchState();
}
}



it's the only script on the object, and it is a single prim, not part of a linked set. the box was 2.0 x 0.1 x 1.0 meters, cut begin .125 and cut end .625.
i was able to replicate the effect several times for a few minutes. after changing the cut parameters to see if it was a factor in the bug, i was no longer able to make it happen.
Ezhar Fairlight
professional slacker
Join date: 30 Jun 2003
Posts: 310
06-01-2004 07:35
There is a known problem with objects drifting when repeatedly using llSetRot (or llSetPos on child prims) but that only is by a very tiny amount, never half a meter.

Try locking the object. Objects with touch events can be moved outside of edit mode, maybe thats what happened.

If not, try using llSetPrimitiveParams instead of llSetRot and check if it still occurs, then bugreport it (Help -> Report Bug).
_____________________