Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005968opensim[REGION] Script Functionspublic2012-04-17 00:252012-04-17 00:25
ReporterKayaker Magic 
Assigned To 
PlatformOSOpenSim Release (UniOS Version
Product Version 
Target VersionFixed in Version 
Summary0005968: llMoveToTarget decays too fast
    The LSL Wiki says that llMoveToTarget “Critically damp[s] to target in tau seconds”. I have measured this and it actually takes much more than tau seconds to decay to target. However, the most common use of llMoveToTarget is to attempt to get linear motion by asking it to move twice as far as you need in twice the time, then starting it over after half the requested time has elapsed. The start of that critically damped curve is reasonably flat and this produces the closest thing to linear motion possible in SL (before the new llSetKeyframedMotion function was FINALLY added).

The Bug:
    Unfortunately, the llMoveToTarget function in OpenSim decays MUCH TOO FAST to the target location, getting there in about 30% of the requested tau seconds. I would prefer that llSetkeyframeMotion is implemented so I never have to resort to the physics engine ever again just to get smooth linear motion for a prim. As a second best option, I would request that llMoveToTarget get to the target in ~three times the requested tau like SL does. If I can't have that, then I would ask that it decay to the target in tau seconds like the the documentation says instead of tau/3 seconds like it does now.

    I tested this on two different installations, one identified in the Region/Estate dialog as “OpenSim Release (Uni” and the other “Griddal 0.7.1 Dev Griddal/r10”. Both got identical results. Also on SL as well, but with different results of course. See the attached bitmap with a plot showing the SL results in red and the OpenSim results in blue.
Steps To Reproduce    Create a prim, mark it as physical, hold it 2 meters or so above the ground with the build dialog, run the following script in the prim, close the build dialog and click on the prim to start the measurement. Wait for it to run the test 10 times and dump a table of averages. Cut the resulting numbers out of local chat and plot them. If you see a bunch of 10.000 values in the last 12 lines, that's the bug, it is not supposed to get to 10 until the very end. (Or ever if you run it on SL).
Additional Informationvector offset=<10,0,0>;
integer go=0;
vector start;
vector end;
list sums;
integer num;
integer i;
        llOwnerSay("Touch to start");

    touch_start(integer number)
        if (go==0)
            for (i=0;i<20;i++)
                sums += [0.0];
            start = llGetPos();
        sums = llListReplaceList(sums,[llList2Float(sums,i)+llVecDist(start,llGetPos())],i,i);
        if (i>=20)
            num += 1;
            if (num<10)
                offset.x *= -1; //reverse direction
                llMoveToTarget(start+offset,10.0); //move back
                for (i=0;i<20;i++)
                    llOwnerSay((string)i+" "+(string)(llList2Float(sums,i)/(float)num));
TagsNo tags attached.
Git Revision or version numberhow do I find my git version?
Run ModeStandalone (1 Region)
Physics EngineODE
Script Engine
Mono VersionNone
Attached Filespng file icon MoveToTarget.png [^] (6,439 bytes) 2012-04-17 00:25

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2012-04-17 00:25 Kayaker Magic New Issue
2012-04-17 00:25 Kayaker Magic File Added: MoveToTarget.png

Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker