View unanswered posts | View active topics


Post a new topicPost a reply
Previous topic | Next topic 

  Beginner BeginnerMember since: 16.03.2012, 20:01Posts: 7 Likes: 0
 

 Post Topic: Vehicle avoidance...traffic sim
PostPosted 11.05.2012, 23:13 
I have a series of paths that I have created with vehicles following them, but at intersections where the vehicles switch to different paths the vehicles just end up wrecking into eachother. Is there a method for vehicle to vehicle avoidance?

Thanks

User avatar   News Posters News PostersMember since: 20.01.2009, 02:39Posts: 3001Location: Glorious Texas Likes: 258
 

 Post Topic: Re: Vehicle avoidance...traffic sim
PostPosted 23.05.2012, 15:24 
There are 2 fairly easy ways to do this.
1) you can use |Time:Delay| nodes to offset the crossings so they will miss each other. However this becomes more complex with each successive vehicle.
2) Use a Proximity node (targeted at a tagpoint) that forces a check each time the vehicle arrives at an intersection.
Put the tagpoint in the center, and set it so it will detect when a vehicle is close enough that it is inside the intersection. If the proximity node returns positive (vehicle in intersection) The vehicle will halt and wait for a false response to continue.
I prefer using the second method, as it hardly ever fails.


Image
No support via PM
  Uber Modder Uber ModderMember since: 11.08.2004, 12:38Posts: 2240 Likes: 61
 

 Post Topic: Re: Vehicle avoidance...traffic sim
PostPosted 25.05.2012, 11:53 
Traffic avoidance is a big problem for me, too. If several vehicles are following the same path they simply bang into each other. They seem to have no knowledge of other nearby vehicles. I think in this respect Cry Engine 1 (Far Cry) was actually superior.
So, is it possible to modify the actual AI behaviour of vehicles so that they don't crash into each other?
Chris
User avatar   News Posters News PostersMember since: 20.01.2009, 02:39Posts: 3001Location: Glorious Texas Likes: 258
 

 Post Topic: Re: Vehicle avoidance...traffic sim
PostPosted 26.05.2012, 02:09 
Editor-side, No.
With Flowgraphs it is possible as i described above, but realtime vehicle avoidance detection would require LUA coding, which is not my specialty.


Image
No support via PM
  Uber Modder Uber ModderMember since: 11.08.2004, 12:38Posts: 2240 Likes: 61
 

 Post Topic: Re: Vehicle avoidance...traffic sim
PostPosted 26.05.2012, 12:26 
"With Flowgraphs it is possible as i described above, but realtime vehicle avoidance detection would require LUA coding, which is not my specialty."

Funnily enough, that's precisely what I'll be doing probably later this year. I've created a complete flight simulator programmed with Lua. When taxiing, the aircraft can detect other aircraft in front or to the side and they will stop and wait in order to avoid collisions. I intend to use similar techniques for wheeled vehicles and they will have proper traffic avoidance etc.
But I'm amazed that the standard AI don't seem to have any traffic avoidance at all....
Best regards,
Chris
User avatar   News Posters News PostersMember since: 20.01.2009, 02:39Posts: 3001Location: Glorious Texas Likes: 258
 

 Post Topic: Re: Vehicle avoidance...traffic sim
PostPosted 28.05.2012, 23:09 
Realtime collision detection would have been nice, but I'm guessing it was more efficient to leave it out, since the feature was never required in-game- similar to the lack of working headlights in C2, and the elimination of the Frozen material layer.


Image
No support via PM