Good to know and another reminder that what was once true (as evidenced by a thread in the Omnibus) may not be true, today.
If you or anyone else is interested in playing around with this effect, here is my test module:
Instructions:Load the module, enjoy the clumping of 100 NPC's all trying to get through each other to a few waypoints and then, when you can't take it no more, click the lever. It's quite a thing to see...
BTW, best viewed with
shadows turned OFF!
More info:A combination of two things have been bugging me a bit in regards to NPC pathing lately. This (Omnibus: Babiak AND slowest) pathing hierarchy as described by Robert Babiak of Bioware:
Robert Babiak wrote...
We do the searching based on the item that will change the least. There is no point in testing if the creature that is blocking you if your destination is blocked by a building.
The other is the relitive cost of determinig if we have intersected a non walkable area. the Tile walkmesh is highly optimized based on the fact that it does not change (we computer the aabb at designtime for this reason). So the test of the tile is the fastest, and we get the most comon blocking thing out of the way first.
now placables may be created dynamicaly so we have a list of bounding boxes that we use to determin if you
are near a placable object we iterate thru this list (slower than the AABB) and determin if we intersect any of the placable objects, secon most common thing you bump into.
Last we test creatures. they are in a list sorted on there X axis. This is optimized for the perseption system not path finding. and to find out if we bump into a creature we need to go thru a chunk of this list. and then determin if the two creatures bump.. slowest operation.
Over all this is done so that we can eliminate a path as invalid in the least amount of time.
And the second is
this video, which isn't necessarily indicative of NPC pathfinding but shows the squirrely crap that can go on behind your back (or I suppose "on your behalf") when the CPU tries pathing through a complex environment. Only a single click is made in the video, and that's on the lever on the raised area. The subsequent movements are all from the CPU attempting to pathfind. I don't know how much of this sort of thing applies to NPCs but I don't like the idea of them in similar states- hence, looking at other approaches such as
EffectCutSceneGhost().
Modifié par OldTimeRadio, 08 janvier 2013 - 04:04 .