I was wondering if someone, willing and able would help us UnityScript users figure out how to work AngryAnts Path and UnitySteer using UnityScript.
Basically what I’m looking at is a road which I’d like populated by cars driving on the “right” side of the road. That would be it for a starter.
I have a nav mesh similar to the road I want the cars to drive on. (obviously making them drive on the “right” side of the road would be solved by cutting the nav mesh in half - but then, would passing be possible in later evolutions of the game?)
I just want the AI robust enough so I can upgrade it’s behavior as the game evolves.
So anyone out-there willing to simplify this for the use of UnityScript users with little knowledge in Ai programming?
Thanks in advance
G.
Maybe this should be moved to the learning/teaching forums
I’m not entirely sure about the reason for the nav mesh. Does the road have junctions that the player can take to get to different destinations? Do the AI players also make these decisions? Even then, a road is usually more easily modelled as a list of waypoints describing the path. A nav mesh is more appropriate for open spaces with obstacles or exits into other rooms, etc. Could you give a bit more detail about how the game is supposed to operate?
Hey Andeeee
Thanks for responding.
From the little experience I’ve had playing with this waypoint list system, the cars seem to travel in an un-natural way (at least in comparison with road traffic).
The idea behind the game, is quite basic at the moment. It is more of the nature of a game mechanic.
Basically, I’d like the road to be a two laner. Each lane occupied by traffic going in opposite ways. The Game mechanic I’m trying to achieve has to do with the proficiency necessary to pass the traffic going in the same direction as myself and avoiding the oncoming traffic. That’s basically it for now.
I keep “feeling” there’s a simple solution to this. Wouldn’t I be able to follow the edge of the road around the track, and place the cars at an offset so they sit in the proper lane?
Thanks again for your response.
Steering Behaviors For Autonomous Characters
http://www.red3d.com/cwr/steer/
Should have all the info you need for driving on roads. (And more)
Thank you, will have a look.
Thanks ackyth.
I suppose the wall following example would be the simplest solution to my basic proposition.
http://www.red3d.com/cwr/steer/Wall.html
It’s all a little much for my current state of understanding. I suppose I need more experience and more knowledge of the basics. I wonder if somebody is up for a thorough tutorial on Path and UnitySteer - maybe as part of the Uniknowledge project.
Thanks for the help.
The wall following would work you could even make it follow the centerline instead of the edge of the road and when you need to pass change it from following from left to right. (then work on avoidance so you get no headon’s
)
Unity Google serch setup:
http://www.google.com/cse/home?cx=002470491425767499270:iugs1ezlsfq
Works wonders when learning.
Yeah steering stuff is a bit much if your new to this but best way to learn is to dive in imo, can read stuff forever and never grasp it as quick as trying to make something work.
(I dived into a Astar pathfinder as my 1st real codeing project was a fun week figureing it out :shock: )
Also dont try to optimise anything or make it fancy just get the barebones stuff working then add to it or rewrite it. It will fix itself along the way as you learn more/better ways of doing stuff.
Thanks for the tips and the inspiration.
I will be diving this week then. 
If I get anywhere with the wall following I shall post the code as it may become useful for others.
Happy week everyone. happy diving.