Distance from roads paths...how to measure

Post » Thu May 03, 2012 6:16 pm

Any way to measure how far an actor is from a road or map paths (i.e. those used by actors)?
In the game, actors use roads when they get an AI to travel.
Is there a way to detect how far an actor is from the nearest path?
User avatar
hannah sillery
 
Posts: 3354
Joined: Sun Nov 26, 2006 3:13 pm

Post » Thu May 03, 2012 4:45 pm

The only way I can think of is not available (yet?)

That would be detecting the nearest preferred path node, but Get/SetPathNodePreferred has not been implemented yet (it is in the wish list, thou).

But this function would be limited to the surrounding loaded cells, anyway (about 150 meter radius).
User avatar
Suzy Santana
 
Posts: 3572
Joined: Fri Aug 10, 2007 12:02 am

Post » Fri May 04, 2012 2:10 am

Thanks QQuix. A long time ago, I tried GetFirstRef/GetNextRef Road (56). It didn't seem to work at the time. I thought maybe the technology has since progressed further.
I still have that bit of code in a backup. I'll try it again later after work.
User avatar
GPMG
 
Posts: 3507
Joined: Sat Sep 15, 2007 10:55 am

Post » Fri May 04, 2012 4:36 am

I was thinking about the Pathgrid functions added to OBSE v20 (look for "Pathgrid" in the OBSE doc - WIKI does not have them yet) because all I can see as different in roads is that roads have blue path nodes (preferred) while the area around it has red or orange nodes.

Your approach is worth a try, but I doubt there is such a thing as a 'road' object to be detected.
User avatar
Greg Swan
 
Posts: 3413
Joined: Tue Jun 05, 2007 12:49 am


Return to IV - Oblivion