MantisBT - opensim
View Issue Details
0006693opensim[REGION] Physics Enginespublic2013-06-28 22:182013-11-11 10:21
Richardus Raymaker 
Robert Adams 
master (dev code) 
Grid (1 Region per Sim)
.NET / Windows64
0006693: llMoveToTarget dont work.
If im trying llMoveToTarget with 0.7.6dev (f78d2ef-r/22948)
the llMoveToTarget dont work very good. If you make a prim with the size of <3., 0.5, 0.5> the prim start to bounce around its own ace uncontrolable.
i used the SL lsl example to test llMoveToTarget

        vector pos = llGetPos();
        llSetStatus(STATUS_PHYSICS, TRUE);
        // Little pause to allow server to make potentially large linked object physical.
        // Look for owner within 20 meters in 360 degree arc every 1 seconds.
        llSensorRepeat("", llGetOwner(), AGENT, 20.0, PI,1.0);
    sensor(integer total_number)
        // Get position of detected owner
        vector pos = llDetectedPos(0);
        // Offset back one metre in X and up one metre in Z based on world coordinates.
        vector offset =<-1,0,1>;
// offset = offset*llDetectedRot(0); //Adding this line will orient the follower relative to the owner's position.
No tags attached.
Issue History
2013-06-28 22:18Richardus RaymakerNew Issue
2013-06-28 22:31Robert AdamsAssigned To => Robert Adams
2013-06-28 22:31Robert AdamsStatusnew => assigned
2013-06-28 22:31Robert AdamsNote Added: 0024153
2013-06-28 22:31Robert AdamsStatusassigned => acknowledged
2013-06-29 14:22Robert AdamsNote Added: 0024157
2013-06-29 14:38argus PortalNote Added: 0024161
2013-06-30 17:16Robert AdamsNote Added: 0024167
2013-06-30 17:19Robert AdamsNote Added: 0024168

Robert Adams   
2013-06-28 22:31   
The crazy dancing reproduces with this script. Definitely a problem.
Robert Adams   
2013-06-29 14:22   
While playing with a fix for this (using forces rather than setting position along with fixing other problems) I noticed that SL seems to make the object phantom when doing llMoveToTarget. That is not noted in the documentation but is that expected?

For BulletSim, when the object gets close to the avatar, it bumps into the avatar which creates rotations and tumbling. In SL, the same script seems to overlap the avatar as if the prim is phantom.

Should a llMoveToTarget object be phantom?
argus Portal   
2013-06-29 14:38   
In SL llMoveToTarget don't switch the object to PHANTOM ! The object has to be PHYSICS. And you can push other objects and avatars while moving with llMoveToTarget. Its a nice toy for griefers.
Robert Adams   
2013-06-30 17:16   
What I see in SL is the 3 meter long object of the example moves to the avatar and one end of the object overlaps the avatar as if the object wasn't colliding with the avatar. The recent changes I made to BulletSim cause the object to move to the avatar but the object starts tumbling when one end of it hits the avatar.

Not sure why the difference.
Robert Adams   
2013-06-30 17:19   
I added a new implementation of llMoveToTarget in BulletSim that uses forces to move the object and does not exhibit the crazy dancing when the object reaches its target. The targeted object can get caught behind barriers that are between it and its target.

There is still some back-and-forth movement when the object is homing in on its target but I'll remove the undamped inertia in the future.

Give it a try.