Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Smooth Rotation and Replacing.

LIO Diesel
Registered User
Join date: 2 Sep 2008
Posts: 28
01-19-2009 04:00
Hi,
Happy New year to all,
I need some suggestions about how we can do smooth rotation and smooth replacing of any primitives using llSetPos() or llSetRot(), Since they took a delay of .2 second by default.
Can sombody suggest me any process or steps or some small code etc.

Thanks
Lio Diesel.
Zaphod Zepp
Registered User
Join date: 13 Jan 2009
Posts: 38
01-19-2009 04:23
Glad I'm not the only one struggling with this!

I've had some success by, first using SetPrimitiveParams(...) so you can set rotation and position at once, and secondly by using multiple scripts on the same prim that run simultaneously, all with a slightly different delay at the start, using something like

do
{
float tod = llGetTimeOfDay();
msec = (integer)(tod * 1000) % 1000;
}
while (msec < msoff || msec >= msoff + 25);

to get the loop to start at the right time (msoff is different for each script - currently I'm using 3 scripts with 0, 80 and 160). They then animate in a hard loop rather than use a timer, and use the root object description to coordinate the animation.
This produces pretty smooth motion for one prim, but I haven't had any luck trying to get multiple prims to move in sync with each other.
Zaphod Zepp
Registered User
Join date: 13 Jan 2009
Posts: 38
01-19-2009 17:52
Forgot to mention, I'd encourage you to vote on this JIRA issue, which will go a long way to improving the possibilities for prim animation:

http://jira.secondlife.com/browse/SVC-2105
LIO Diesel
Registered User
Join date: 2 Sep 2008
Posts: 28
01-20-2009 06:04
can u please mention any complete working code, the idea which u share, i am not able to implement.
Thanks.
LIO