Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Trouble with llMoveToTarget

Hanover Dench
Registered User
Join date: 1 Jun 2007
Posts: 8
06-23-2007 07:54
All,

I looked for similar threads before posting, but I probably just missed them, so please forgive me for this if it's already come up.

I'm having difficulty getting llMoveToTarget to function as I expect it would, and I either don't understand something, or I'm not using the function properly, but either way it's causing me a great deal of frustration.

I expect that the object acted upon would move in a straight line as defined by the XYZ of the object and the XYZ of the target. This does not seem to be the case in two important ways.

First, my llMoveToTarget is changing only the Z axis (it's an elevator), and yet both X and Y axis are also changed, sometimes as much as .05.

Second, the object never reaches the destination coordinates no matter how many times I issue the llMoveToTarget.

In other words, it seems imprecise.

I fail to see how imprecision is a good thing. God knows I don't want my FirstLife elevators to get "near the 83rd floor" and then open the door. As Second Life is well thought out I conclude I don't understand something.

Am I doing something wrong?
What can I do to improve the precision?

Thanks,
Hanover Dench
Sho Iuga
Registered User
Join date: 6 Jun 2007
Posts: 35
08-09-2007 13:20
there are 3 problems with llMoveToTarget.

First: It needs your script, that means the prims it is in, to be physical. Physical Objects cannot move too near to other objets (unless those are phantom). So if there are objects near the target position it will affect your movement. It still tries to dump into the target position, but cannot do so perfectly.

Second: The Linden World is a bit weird. Objects get a certain ammount of "energy" over time. But functions like llMoveToTarget spend energy. This makes sure, you cannot lift heavy objects. But maybe this induces inprecision even for light objects and for heavy object ...

Third: This function really seams to be a bit imprecise to the extent of around a few cm even when point one or two hardly matter.