Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

How do I get an object to move along a set of vectors that are in a list?

Eleri Jonze
Registered User
Join date: 22 Jan 2007
Posts: 7
08-10-2007 08:37
Hi, Im after some scripting advice,

I need to find a way to get an object (can be attached or detached fom avatar, but need to see objects/avatars point of view) to recall vectors from a list, and then move along the vectors.

Currrently have a "For" loop to iterate through the list, (then tried the llApplyImpulse and llMoveToTarget functions). Neither of these worked successfully.

Would it be better if I had the "object" as a vehicle? Can a vehicle recall vectors from a list then move from one to another?

If anyone has any more info, or can help me, I would be very grateful,

Cheers
Eleri
X
Shadow Subagja
Registered User
Join date: 29 Apr 2007
Posts: 354
08-10-2007 09:35
You may give the llMoveToTaret approach another try if you rely on the at_target event and set your target to the destination prior to the move. The you could make the code like this:

set target
movetotarget

at_target()
{
if(!lasttarget)
{
set target
movetonexttarget
}
}

That should work, but not if you want a very smooth interpolation between points, if thats the case I'd be using llPushObject calls and normalizing impulses.