Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Object Position Drift with llSetRot

Gearsawe Stonecutter
Over there
Join date: 14 Sep 2005
Posts: 614
10-22-2006 12:44
With certain combinations of Object Type, Parameters, Initial Angle and amount rotated by, using llSetRot will cause and object to drift slowly with each call. Have an object set to change its Rotation every 0.5 sec. After 14 hrs it has moved from 226.0, 70.0, 327 to 226.0, 72.838, 325.323. The amount it will drift by will be one of six numbers +- 0.000015 or +-0.000008 or +-0.000004. And most of the time 0.0

So things such as swings, doors and such could potentially move over time. Not everything will drift. The Box I have setup now has a TaperX 0.8 initial angle of 270, 0.0, 90.0 and chage to an angel 315.0, 0.0, 90.0 and back every 0.5 seconds. After finishing this post it is now at a positoin of 226.0, 72.846, 325.309. I don't know about you but this is kinda of bad.

EDIT:
every time I test this more, I keep finding more oddities. So it is more and more random. Or the Altitude also plays a role.

EDIT:
Here is a test script.
Rez a box put this code in it.
Touch it to start it running.
Open the Script Error/Warnning window
Notice the drift will be 0.0.
Now keep adjusting the TaperX until you start to see a change in the DRIFT.
CODE
vector angle_delta = <45, 0, 0>;
rotation rot_close;
rotation rot_open;
integer running = FALSE;
integer open = FALSE;
vector drift;
vector pos1;
vector pos2;
list data;

default
{
touch_start(integer total_number)
{
if (running == FALSE)
{
running = TRUE;
rot_close = llGetRot();
rot_open = rot_close * llEuler2Rot((angle_delta) * DEG_TO_RAD);
llSetTimerEvent(0.4);
}
else running = FALSE;
}
timer()
{
if (open == FALSE)
{
pos1 = llGetPos();
llSetRot(rot_open);
open = TRUE;
}
else
{

llSay(DEBUG_CHANNEL, llList2CSV(data));
llSetRot(rot_close);
pos2 = llGetPos();
drift = pos2 - pos1;
data = ["DRIFT= ", drift.x , drift.y, drift.z, "POSITION= ", pos2.x, pos2.y, pos2.z];
open = FALSE;
if (running == FALSE)
{
llSetTimerEvent(0.0);
}
}
}
}

EDIT 11-12-06
oject now at 226.00, 101.900, 267.200
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
10-23-2006 11:12
I've seen this, and it's really annoying. Things also seem to drift in their positions in a much slower, glacial fashion, even if they don't have any scripting in them at all. You can build something with perfect alignment of seams, and it'll slide over time, gradually, but eventually producing nasty visible seams. My theory on this is that the procedure of saving the simstate and then restoring it is slightly lossy.
Gearsawe Stonecutter
Over there
Join date: 14 Sep 2005
Posts: 614
10-24-2006 09:55
From: Lex Neva
...Things also seem to drift in their positions in a much slower, glacial fashion, even if they don't have any scripting in them at all. ....

So is that why the wall in the Morris sand box dont line up anymore? There are gaps and overlaps on every wall section.

Going to to monitor some of my builds for a while. And see how much they drift by and when they start to drift. As soon as one drifts by a hair I will know.
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
10-24-2006 10:14
I haven't seen that wall, but one thing I have done is record the position/rotation of every prim in a big build in the descriptions. Now, six months later, I can go in and see that some of them have drifted a fairly significant amount.
Gearsawe Stonecutter
Over there
Join date: 14 Sep 2005
Posts: 614
10-24-2006 11:22
Well I put scripts in a bunch of my stuff that will check its postion ever few minutes. I'm Looking for a pattern or somthing. This can't be random. although I can't say it is not random. Maybe after a sim crash and a restore this does happen. Maybe just right click on the prim causes the problem or maybe just looking at it8-) I swear somtimes the main grid is really a large scale Beta grid and we are all testers. But oh well. The one item I have running in Beta now has drifted 5meter over a 24hr period. Actually I had a hard time finding it since it embedded itself into aother prim. This is a rather ugly bug that has been around far to long. It needs to be squashed dead.

I was thinking, is this their way of making things decay? maybe make them randomly unlink and turn physical over a long period of time. Or have earth quakes! maybe land shift and volcanoes form, burning down build that lay in its path!
Seifert Surface
Mathematician
Join date: 14 Jun 2005
Posts: 912
10-24-2006 11:42
I'm considering automatically rerezzing some of my builds every few days. Others use another script to llSetPos on a (long) timer.

Here's a thought: All of Starax's sculptures out in the world will gradually decay over time. Only the wand sculptures get rerezzed from inventory (and I'm pretty sure that objects in inventory don't suffer from prim drift), everything else will explode glacially slowly. Just like real antiques, better keep it out of direct sunlight (in your inventory) if you want it to last...
_____________________
-Seifert Surface
2G!tGLf 2nLt9cG
Gearsawe Stonecutter
Over there
Join date: 14 Sep 2005
Posts: 614
10-24-2006 12:54
That just the problem we shouldn't have to do all these work arounds all the time. LL is just hurting themselves. Just more script to reduce script performance. Granted it is not by much. It does not seem like objects drift in a link set but the whole link set drifts. Or is this also a problem?