Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llMoveToTarget() falls short of the target pos

Bluefish Sands
Registered User
Join date: 8 Jun 2007
Posts: 5
06-26-2007 07:22
I am having trouble moving objects to the desired position using llMoveToTarget.

I have a main object that rezzes several objects. The rezzed objects then move forward to a certain position. The problem is that the objects stop short of the target position and hence the at_target event doesn't fire.

targetID = llTarget(newPos, 0.25);
llMoveToTarget(newPos, 20);

If I set the range in llTarget to 0.5 the at_target event fires though i need the range to be much less.

I used llApplyImpulse and llSetForce thinking that the objects don't have enough power to move ahead. But that didn't help either.
Also sometimes one or two of the rezzed objects decide not to move forward at all!

Does anyone know the reason ?
Senuka Harbinger
A-Life, one bit at a time
Join date: 24 Oct 2005
Posts: 491
06-26-2007 09:57
From: Bluefish Sands
I am having trouble moving objects to the desired position using llMoveToTarget.

I have a main object that rezzes several objects. The rezzed objects then move forward to a certain position. The problem is that the objects stop short of the target position and hence the at_target event doesn't fire.

targetID = llTarget(newPos, 0.25);
llMoveToTarget(newPos, 20);

If I set the range in llTarget to 0.5 the at_target event fires though i need the range to be much less.

I used llApplyImpulse and llSetForce thinking that the objects don't have enough power to move ahead. But that didn't help either.
Also sometimes one or two of the rezzed objects decide not to move forward at all!

Does anyone know the reason ?



if the objects are massive in size they are most likely running out of energy. Use llGetEnergy() in a timer loop to see what the object's energy is at, if it dips below .001 when your problems occur then that is almost certainly the cause of your issues. There is no way that I know of to "Refuel" an object for energy.
_____________________
My SLExchange shop

Typos are forgiven; desecrating the english language with reckless abandon and necrophilic acts is not.


The function is working perfectly fine. It's just not working the way you wanted it to work.