Sunday, 29 May 2011

Unity car AI with collision avoidance, improved cornering

Cornering:
Before the car picks a new waypoint i.e. makes a turn it works out if it is a left turn.
If it is a left turn then it turns early, otherwise it turns late.
This can then be used for advanced stuff later.

Collision detection:
Now improved, casts a ray in front of the car and stops if stuff is in the way.

I put loads of cars in and most do well, the main problem is the crossroads.
Basically because they don't give way to anything, just stop if something's in front.
This is where the advanced stuff for turns can come in.

2 comments:

  1. I'm afraid I don't know of any good books on teaching strategies for learning disabiliities
    Flo Longhorn is very knowlegable and the SLD forum may help.I'm also in west sussex so you could come and observe some students

    ReplyDelete
  2. I finally have some time to look at your code...
    I dont'know what you did for advanced stuff for the turns.... but if you adjust the frontrightwheel.steerAngele to a lower number the turn is bigger and they won;t crash/stop...

    ReplyDelete