[Opensim-users] NPCs DoMoveToPosition vs DoAutoPilot

bodzette Coignet bodzettecoignet at gmail.com
Wed Oct 27 20:47:11 UTC 2010


After some hair pulling and running into someone with complementary skills
I've made some progress:
I've managed to get a server side NPC to do the following:
Rezz, Say something, Play an Animation and Delete itself.

Unfortunately at the moment I can't get it to move and am currently
investigating why not. Right now my understanding of things is somewhat
limited so forgive me if my questions sound stupid to those in the know:

A couple questions:

Given that the NPC code appears to use a bunch of different autopilot code,
I'm guessing that this is specific to NPCs and is not the way regular
avatars move. It appears to be broken somehow, because the code is called
but the NPC doesn't move. What is the difference between movement for a
regular avatar and an NPC? It's my position that there really shouldn't be
one, but could someone fill me in?

What is the code that moves a standard (i.e. non-NPC avatar) is it
Region.Framework.Scenes.ScenePresence.DoMoveToPosition or is it somewhere
else?

What is a ScenePresence? Is it that portion of a scene corresponding to a
single avatar? If so is there any reason why an NPC avatar should exhibit
different behavior here than a regular avatar?

Can anyone give a program flow of how a regular avatar moves?
My guess is it's something like this:
 Intecerpt Arrow Key or Movement Control Arrow ->
Pass avatar UUID and force and vector to server ->
server finds avatar in scene (looping through scene dictionary of avatars
till it identifies the right one?) ->
server applies force and vector to appropriate avatar in dictionary ->
avatar enters, does and completes movement ->
server updates entire scene x times per second until avatar movement is
completed

Anyone verify the flow?

Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-users/attachments/20101027/f04024ed/attachment.html>


More information about the Opensim-users mailing list