Modify

Opened 3 months ago

Closed 2 months ago

#54 closed defect (fixed)

Puppeteer Pathfinding (Movement): llVecDist doesn't get calculated right

Reported by: Cindy Reynaud Owned by:
Priority: minor Component: Corrade LSL Templates
Keywords: SimPosition Cc:

Description

Re: [WaS] Corrade: Puppeteer Pathfinding (Movement) Version 1.0 2014-11-14 21:11:03 lsl2 script

The bug is the llVecDist that results in a wrongly calculated float seconds, because the vector origin always stays a ZERO_VECTOR as defined from the beginning.

The agent's autopilot itinerary either takes off too early or excessively too late.

I belive Progressive 9.172 is working since I was able to "command=getselfdata&data=SimPosition?" with the Test Hud to verify that the agent's permission notifications and notification collisions were enabled.

The problem might be the part where SimPosition? is parsed into vector origin, either it doesn't occur or with error. It may have broken over the years in between a Progressive update.

My scripting syntax is limited so the best I could do was patch it.

I commented lines 454 to 460:

Line454: origin= (vector)llList2String(
Line455:
data,
Line456: llListFindList(
Line457:
data,
Line458: (list)"SimPosition?"
Line459:
)+1
Line460: );

And inserted line 504:

Line503: llSetTimerEvent(llVecDist(origin, next)/3.20);
Line504: origin = next;

This doesn't fix the first time llVecDist is used, but does give a better corrected llVecDist with little error, allowing folks to explore this template with more fun.

Hopefully someone with more experience can fix the vector origin properly.

Attachments (0)

Change History (3)

comment:1 Changed 3 months ago by Cindy Reynaud

The script works when you recompile it.

It won't work out of the box, but if you delete the script, make a New Script, paste in the code, and let it compile, it works as advertised :D

comment:2 Changed 3 months ago by tha

Hello and thanks for reporting! I have tried to reproduce by adding:

llOwnerSay("Origin: " + (string)origin);

After:

origin= (vector)llList2String(
            data, 
            llListFindList(
                data, 
                (list)"SimPosition"
            )+1
        );

and the origin vector does change:

[19:43]  [WaS] Corrade: Puppeteer Pathfinding: Origin: <115.06150, 149.06040, 22.70395>
[19:43]  [WaS] Corrade: Puppeteer Pathfinding: Origin: <109.80090, 150.22280, 22.70513>
[19:43]  [WaS] Corrade: Puppeteer Pathfinding: Origin: <115.05090, 145.55600, 22.70347>
[19:43]  [WaS] Corrade: Puppeteer Pathfinding: Origin: <115.12520, 149.37910, 22.70396>

Indeed, some primitives / scripts in SL just die after a while. It is a longstanding issue that has never been resolved by Linden Lab.

I have found that, taking the primitive's content inventory, deleting the primitive, creating a new primitive and copying the primitive content to the new primitive fixes the issue.

Did you retrieve the item from the marketplace? If so, then please let me know and I'll try to cycle the primitive.

comment:3 Changed 2 months ago by evacomaroski

Resolution: fixed
Status: newclosed

The marketplace template has been recycled and I am closing this down as fixed. If you think this was in error or the issue resurfaces, please feel free to reopen this ticket. Thank you!

Modify Ticket

Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.