Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

default prim moving -can speed be set?

Abraxes Binder
Registered User
Join date: 23 May 2008
Posts: 205
06-11-2008 03:48
Hi, If A prim is moved from pos1 to pos2 with llSetPos or llSetLinkPrimitiveParams, This will take place at a 'default-speed'?
Can this be altered?
I think not.. But how can smoth speed movement of a prim or and a child then be implemented?
Search for 'speed' gave nothing.
Tyia.

(btw.. weirdly -if a 'edit' window is open pos-changes takes place at instant speed, With the edit window closed, speed is slower and a slight de-accelration takes place.. Havov-funnie i think :)
_____________________
BR ab
Dekka Raymaker
thinking very hard
Join date: 4 Feb 2007
Posts: 3,898
06-11-2008 03:54
just a suggestion, search for acceleration?
_____________________
Nexii Malthus
[Cubitar]Mothership
Join date: 24 Apr 2006
Posts: 400
06-11-2008 07:12
https://wiki.secondlife.com/wiki/Interpolation

CODE

vector Pos1;
vector Pos2;
float Rate = 0.05;

vector vCos(vector v0,vector v1,float t){
float F = (1 - llCos(t*PI))/2;
return v0*(1-F)+v1*F;}

default{
touch_start(integer d){
float x;
for(x = 0.0;x < 1.0;x += Rate){
llSetPos( vCos(Pos1,Pos2,x) );
}
state Two;
}
}

state Two{
touch_start(integer d){
float x;
for(x = 0.0;x < 1.0;x += Rate){
llSetPos( vCos(Pos2,Pos1,x) );
}
state default;
}
}
_____________________

Geometric Library, for all your 3D maths needs.
https://wiki.secondlife.com/wiki/Geometric

Creator of the Vertical Life Client
Shadow Subagja
Registered User
Join date: 29 Apr 2007
Posts: 354
06-11-2008 08:49
that is nonphysical movement so there is no way to control the speed of the steps taken, just the number and the frequency of steps.

physical movement (using llMoveToTarget) can more reliably be used to get visible speed changes. on the wiki look under physics (you can apply forces/impulses, or use moveToTarget to get the object to accelerate/decelerate itself from point A to point B over a certain time).
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
06-11-2008 08:51
One step with non-physical movement is actually instantaneous, though I think the viewer does show some interpolated positions in between to make long hops look smooth. Don't let that fool you though; the object is never at any of those points in between; it goes immediately from being at point A to being at point B.
Abraxes Binder
Registered User
Join date: 23 May 2008
Posts: 205
Thanks!
06-12-2008 00:53
Very usefull information, Thank you!
I think the right way is to use llMoveToTarget, but i will also look at your script Nexii, Thanks to all.
_____________________
BR ab