Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Simple Traffic System

Discussion in 'Assets and Asset Store' started by Stephen_O, Dec 15, 2019.

  1. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,507
    Hi, I don't currently have plans for people. I'll think about it, maybe when I feel this asset is complete I can use some of this asset's systems as a foundation.
     
  2. Hazneliel

    Hazneliel

    Joined:
    Nov 14, 2013
    Posts:
    303
    Thanks for the reply.
    How difficult would be to adapt this asset if I have a pedestrian system using nav agents so that cars will not run over them?
     
  3. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,507
    You can set the Detection Sensor Layer Mask to the layers you want it to detect, for your case it would be whatever layers the cars and pedestrians are on. By default this layer mask is only detecting cars.

    DetectionSensorlayermask (1).png
     
    Hazneliel likes this.
  4. MegaMileyStudios

    MegaMileyStudios

    Joined:
    Aug 19, 2017
    Posts:
    72
    This asset looks awesome and I'm definitely interested in getting it this weekend! One question I have though is, how easy is it to alter the AI of the cars? For instance, I saw that cars getting close to a traffic light that's red with cars in front of it only brake at the last possible moment, I'd like to be able to control it so they can brake earlier and more natural (like letting go of the gas peddle first before actually braking). Also I'd like to be able to add imperfections to the AI so they aren't as perfect as they are (think of how GTA and Just Cause handle their vehicle AI's).

    Also, is there a way to tell a car to go from point A to point B instead of having them roam around randomly? If so then it could be a really awesome base for a city builder game where the people will actually go from home to work and the shops when needed. To build on top of that, would parking cars also be a possibility already or something that I could add as part of my AI? Would be really awesome to have an automated system where an NPC walks out of their house, gets in their own car, drives to work, steps out again and enters the work building (and of-course many other locations). Since it's build on top of DOTS performance wise it shouldn't be too much of an issue I'd assume (and the rest of the AI I would also need to build with DOTS in that case of-course ;) )
     
    Stephen_O likes this.
  5. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,507
    Altering behavior of cars is not something that's possible, they are fairly dumb and follow a simple rule set. I'm working on improving the simulation by allowing each car prefab to have it's own top speed, and adding lane change functionality so cars can overtake slower vehicles. There has been some improvement to braking during this new feature's development, specifically the cars now gradually slow down based on the forward sensor's hit distance to the car car in front of it until it reaches a force stop distance threshold. I still want to try to get the red light stop to be a bit smoother, since the detection sensor is not used there it will require different logic and is currently a hard stop. This update should be ready by end of month.

    The cars use modular waypoint routes and only respond to waypoint triggers for the route they are currently on, meaning you can likely have multiple routes on the same street. For example, you can setup a general purpose road network for all dumb cars, then add more specific waypoint routes specifically designed for the quest you're trying to create, the general routes would not be connected to this route and this route does not connect to the general route, unless you want to create and end of quest exit point to the general route. Then load the NPC car into the custom route so it's not part of the dummy simulation and can follow your custom route. The waypoints have an inspector OnReachWaypoint event that you can use to setup custom logic (stop the car, trigger your own scripts, etc).

    WaypointRoute.jpg

    If you feel like something in the asset doesn't feel right for your need, I would recommend not buying it and instead find a better tool that does what you actually need. The main goal with this tool is to provide good performance for a decent background traffic simulation.
     
    MegaMileyStudios likes this.
  6. MegaMileyStudios

    MegaMileyStudios

    Joined:
    Aug 19, 2017
    Posts:
    72
    Ah good to know, yeah if it's mainly for the background system then I might want to search a bit more, thanks :)
     
  7. Meceka

    Meceka

    Joined:
    Dec 23, 2013
    Posts:
    420
    Hello, considering buying this asset, we are currently using ITS and right now the only reason I'm considering to change it for the performance on mobile.

    I have lot's of questions and can possibly give lots of feedback. I also commented on one of your videos a few weeks ago (about pooling).

    Is it possible to set the desired traffic density based on the road?
    For example, more traffic density (and more spawns) in city centres, but less in highways and even less in country roads.

    Is there some progress with Easyroads spline integration?

    Can we set the AI to use our own custom physics?

    Is it allowed to manually destroy (put back to pool) a vehicle by our own code?

    Is it possible to change layers/layermasks that this asset uses? Our project already uses around 25 layers. And they can't be moved.

    Can we for example assign 4 types of vehicles to the system
    *Ordinary cars
    *Trucks
    *City Bus
    *Farming vehicle

    And set up which vehicles each road allows, blocking trucks from driving/spawning into city centers.
    Make sure Bus only drive in city centres.
    Farming vehicles spawn and drive country or dirt roads
    Cars drive anywhere

    Would such a feature be added with updates?
    Ability to spawn a vehicle on a waypoint with assigning it a target waypoint. Then it makes simple pathfinding first and on each intersection, it chooses the correct road to reach the target.

    Also maybe some cool stuff like using horn and blinking headlights when they are blocked for too long, or they get in a risky situation.

    Thanks
     
  8. joeyether40

    joeyether40

    Joined:
    Jan 26, 2018
    Posts:
    20
    Hey i just bought this system and have tried to set up a simple test scene using easyroads 3d demo scene. the cars will cause a traffic jam very easily if another car meets them . This happens at all intersections. Also if a car happens to overshoot its intended way-point and hit a way-point on the other side of the road, the car stops completely. I bought this system as a way to make a better AI system then the one i used from a tutorial on you-tube. So far the free one is way better, it at least has avoidance for other cars. Please give a suggestion as to how to keep cars from doing this behavior.
     
  9. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,507
    No, density is a global property on a scriptable object profile. It can be lowered at runtime but can not be increased beyond the starting density.
    I have no plans for easy roads integration at this time.
    No.
    Yes, each AITrafficCar is assigned an index by the AITrafficController, you can call AITrafficCar.MoveCarToPool() or by calling AITrafficController.Instance.MoveCarToPool(int _index)
    AITrafficCar.MoveCarToPool()
    is being added in version 1.0.6.
    Yes, you can set the Detection Sensor Layer Mask on the AITrafficController.
    DetectionSensorlayermask (1).png
    No, the asset does not use vehicle types. You would need to create unique routes that are dedicated for this purpose.
    I'm not sure, I don't currently have plans for this.
    Maybe in a future update.
     
  10. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,507
    I recommend watching the tutorials. They will teach you how to use the asset.
    You need to setup traffic lights for intersections so cross traffic can stop.
    You need to set waypoint speeed limits to control how fast a car can travel on any given route point.
    I'm not sure how you've setup your waypoint routes, so it's hard to tell what's wrong.
    In this video I explain how the demo scene works and was setup. I also do a walkthrough to show how to get started and explain how everything works.

    There's also a playlist with some other tutorials that have been added to help speedup workflow.

    https://www.youtube.com/playlist?list=PLy0oHZ9DiHn-JYNHWNMkwbpIDXBv8SGJN
     
  11. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    Hello,
    Saw this asset today and I'm planning on buying it for the purpose of having some background traffic (needed something light, it's just to bring some life around)
    I do have a question: My project being Sci-Fi, some vehicles do not have wheels. Will this throw errors if I create a wheel-less (is that a word?) AI car ?

    thanks by advance and really good job on the asset!
     
    Stephen_O likes this.
  12. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,507
    The wheel colliders are what makes the car move, so they are required. The only thing I can recommend here is to use the wheel colliders but not the wheel mesh renderers - so there will be wheel collider moving the vehicles but no visual mesh being rendered. If you want I can alter the code for you so it does not require wheel mesh renderers to be assigned, otherwise you would get an error.
     
    Necka_ likes this.
  13. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    I totally get what you mean, a flying car in the game is still a car but with invisble wheels, makes sense
    I'd love this small modification, or just point me where I should do it until you push the next update :)

    Just bought it before your reply... I was sure it would not be a big issue ^^
     
    Stephen_O likes this.
  14. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,507
    Actually, it's looking like no modification is necessary. I emptied the wheel mesh fields on a prefab and it seems to work alright. If you notice any strange behavior when using it let me know.
     
    Necka_ likes this.
  15. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,507
    Version 1.0.6 is almost ready and will be submitted this weekend.

    Video:


    Updated Demos:
    https://www.turnthegameon.com/simple-traffic-system

    Change Log:
    • Added support for lane changing.
    • Added top speed field to AI Traffic Car prefabs.
    • Added left and right sensors to AI Traffic Car prefabs for lane changing.
    • Added Lane Connector window, used to assign the lane change waypoints from 2 routes to each other.
    • Added "Align Waypoints" button to AITrafficWaypointRoute.
    • Changed scene view unselected handle button colors from grey to white, improves visibility.
    • Changed scene view selected handle button colors from grey to cyan, improves visibility.
    • Changed AITrafficController default detect Layer to 30.
    • Improved waypoint route spawning to use spawn points without pooling, allows the cars to spawn in a more random patterns instead of being clumped toger at the start of each route.
    • Improved car behaviour when front detection sensor hits a target, the car will now reduce its top speed based on distance to hit target instead of comming to a hard stop.
    • Improved demo scene end of route waypoint positions so the cars stop at the stop line instead of before the stop line.
    • Fixed a bug where the final 2 points would not be generated when using the route creator tool.
    • Fixed a bug where car wheels would be at 0,0,0 for the first few frames on scene start.
    • Fixed a bug where the from point qould not properly register and save changes to a prefab when using the Route Connector Window.

    There may have been some other miscellaneous bug fixes or minor additions that were not tracked in my log. If anyone has experienced a bug not listed feel free to let me know so I can look into a fix. At this point, the next area of focus is testing the simulation for areas of improvement/bugs, and improving the editor helper tools.
     
  16. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    Looks like an awesome update! thanks for this!
    I have a small request, I guess it's kind of specific so it might not be high priority or considered at all but here goes:

    I have some truck models with more than 4 wheel (6 in total - not spare ones but really touching the ground)

    I was wondering if you could add a small "Optional renderer" list field or renderer fields. It doesn't need more than the 4 original wheel colliders etc, it's just to have the wheels models rotating nothing else, purely visual
     
    Stephen_O likes this.
  17. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,507
    Here's a script that can do this for you.

    Attach it to your dummy wheel mesh and assign a reference wheel mesh, this will let the fake wheel have the same rotation and y position offset as the reference wheel.

    Code (CSharp):
    1. using UnityEngine;
    2.  
    3. public class FakeWheel : MonoBehaviour
    4. {
    5.     public Transform referenceWheel;
    6.     private Transform fakeWheel;
    7.     private Vector3 newPosition;
    8.  
    9.     private void Awake()
    10.     {
    11.         fakeWheel = transform;
    12.     }
    13.  
    14.     private void Update()
    15.     {
    16.         newPosition = fakeWheel.position;
    17.         newPosition.y = referenceWheel.position.y;
    18.         fakeWheel.transform.SetPositionAndRotation(newPosition, referenceWheel.transform.rotation);
    19.     }
    20. }
     
    Necka_ likes this.
  18. Gatskop_Software

    Gatskop_Software

    Joined:
    Sep 21, 2014
    Posts:
    86
    Hi I am looking into buying this asset got some questions is there a way to create an accident, for example, some faulty traffic lights?
     
    Stephen_O likes this.
  19. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,507
    The traffic light manager script currently just runs a sequence on loop in a coroutine, that won't be hard to modify and have an alternate logic sequence, sounds like it could be a fun option in some scenes. I'm not sure if I'll add it as a permanent feature, but let me know if you buy and I can modify the light script to do something like all green for you if you need.
     
  20. Gatskop_Software

    Gatskop_Software

    Joined:
    Sep 21, 2014
    Posts:
    86
    Ok thanks just to make sure if I buy the asset would you be able to expose the bool for traffic lights to work or not because I need the be able to enable and disable that with playmaker?
    Also will the cars crash or just stop en pile up traffic
     
  21. Gatskop_Software

    Gatskop_Software

    Joined:
    Sep 21, 2014
    Posts:
    86
    I did send you the invoice number
     
    Stephen_O likes this.
  22. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,507
    Great, thanks for the purchase and invoice number. I sent you a message.
     
  23. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,507
    I made a new workflow tutorial that's more detailed and makes use of the new editor helper tools to created/connect routes and setup intersections.

     
  24. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,507
    Version 1.0.6 has been submitted. The introductory price will be removed and set to $60 with this update.
     
  25. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,507
    Version 1.0.6 will also add support for the humanoid avatar driver from the IK Avatar Driver package.

     
    vorokoi likes this.
  26. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,507
    Version 1.0.6 is now available.
     
    mgsvevo likes this.
  27. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    Edit: Fixed the issue but it's still a problem. My AI Traffic light are under prefabs. I unpacked the prefabs and it works. I don't understand why but that might need to be investigated

    Hello Stephen,
    I have a weird issue. So I'm on 1.0.6.
    I've setup an intersection. Where all my traffic lights prefabs and cycles are setup, I use the Signal connector tool to connect from each traffic light to the proper lane. I can see the gizmos, everything is fine. I unload the lights and reload them just to make sure: all good, Gizmos are still there.
    Save the scene, press play: Cars are not respecting the lights.
    Exit play mode, load the lights and route via the signal connector window: All the connections are gone (no more red gizmos between light and lane)

    So just in case I forgot something, I re-did it, and same thing, once going in play mode, no traffic lights

    The cycle works though, it's just the connection between light and lane that is apparently lost when I enter play mode.

    Would you have an idea on what could cause this issue?

    I'm using Unity 2019.3.4
    I do not use the Enter Play mode experimental feature in that version of Unity (as I know that can cause this kind of issues)

    Edit, for more info:
    When using the debug, it shows the proper route (2 lanes road number 7) the Route index is weird though, I'm not sure what it is because if it's the waypoint I have only 12 waypoints on that route so the index if it is what I think should be 11

    upload_2020-3-7_16-40-19.png
     
    Last edited: Mar 7, 2020
    Stephen_O likes this.
  28. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,507
    Hi Necka,

    Thank you for the bug report, sorry about about confusion it caused.

    You can resolve this bug by editing line 112 on Editor_SignalConnectorWindow script.

    Replace

    Code (CSharp):
    1. EditorUtility.SetDirty(lightsToEdit[fromLightIndex].waypointRoute);
    with

    Code (CSharp):
    1. EditorUtility.SetDirty(lightsToEdit[fromLightIndex]);
     
    Necka_ likes this.
  29. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    Hey Stephen,
    thanks for the quick fix, it works fine now :)

    One quick question, I'm really sorry if I missed it despite watching all your videos but maybe not paying attention: How can I disable the waypoints red square? I noticed they are not gizmo, they do appear in Game view. I don't mind them in scene view
     
    Stephen_O likes this.
  30. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,507
    No worries, I don't think I ever mentioned them, they're just mesh renderes on the waypoints, the intention is for you to remove them when done with setup.

    Type AITrafficWaypoint in the Hierarchy search field and Shift Select all the waypoints, then you can remove/disable the mesh renderer from all at once.

    In the future they might be changed to gizmos.
     
    JBR-games and Necka_ like this.
  31. mthawley

    mthawley

    Joined:
    Sep 7, 2018
    Posts:
    103
    Hi. Regarding the waypoints red square, I placed the prefab into a new Waypoints layer and excluded that layer from the camera culling mask. That way I can see the waypoints while editing but not while playing. Cheers.
     
    Necka_ likes this.
  32. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    Quality of life idea:
    I personally have cars with multiple materials (most of the time the doors, as they can open they are on a separate mesh)
    I extended the AITrafficCarRandomMaterial script and added a bool "CarHasMultipleRenderer" associated with a list of Renderers.
    At setup time I manuall add the renderers and then the script just change the material for those additional renderer OnEnable like it is today
     
  33. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    Sorry for the spam,
    I'm encountering a problem. I've setup the whole system including traffic lights, proper speeds, intersections, Spawn points etc.
    Everything is working fine
    The last step for me was to enable pooling. And that's where I have a problem
    On play mode the pooling debug circle stays at 0,0,0 (not on Camera) and I have this error:
    upload_2020-3-8_22-15-18.png
    The error is spammed, I believe it's in Fixed Update

    Maybe I did a mistake, I kind of followed the video and the demo scene.
    Each routes have spawn points, Box is checked with "use spawn points" and I have 2 to 3 prefabs on each routes (and around 3 spawn points per route)
    Center point is setup on main camera
    AI Traffic pool is setup like this:

    upload_2020-3-8_22-17-27.png

    Edit: I have no idea what's going on with the pooling system and I'm sorry to say that but it's a bit confusing so far.
    I managed to have it working by deleting all spawn points and re-creating them. Don't know what triggered the issue at first.
    Moving on: I can't get the system to have some density. Whatever I try I either have 2 cars or at max 5
    I tried to pump or lower the numbers in the pool configuration, to have the center point on my player (as my camera is quite far away), nothing works.
    I even tried to put a ridiculous amount of spawn point, that doesn't help
    upload_2020-3-8_23-12-34.png
    upload_2020-3-8_23-14-38.png

    So, I'll disable Pooling for now and run it with regular spawn points as it works fine. But Pooling would be a great optimization for me as it's a top-down game, the actual view point is quite small, so I don't need the spawn area to cover the whole map at all, just 80/100 around the player.
    Also some documentation to know what each numbers do on the pooling configuration would be helpful (especially density, spawn rate, active zone, minimum spawn zone)
    I'll wait for your advice :)
     
    Last edited: Mar 8, 2020
  34. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,507

    The error alone is not providing enough information for me to debug. I'm not able to reproduce this at all, if I take the default demo scene, enable pooling, and assign the center point it's working fine.

    What it seems like is the driveTargetTransformAccessArray that the job depends on is not being created, I can't think of a reason that would happen.. that gets created when the first car is registered with the controller.
     
  35. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    Hi Stephen I edited my post while you were replying with the way I fixed it and some "new" issues for me
     
  36. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,507
    This is specific for top down.. feel free to pm me for screen share if you still feel lost and can't get it working.

    It looks like your min spawn zone is too large (white area). This zone should likely be a bit larger than screen space area. Cars will never spawn or despawn from this area.

    The active zone (blue area) should be a little bigger than the min spawn zone. Cars will only spawn here if the spawn point is not visible by camera.

    The spawn zone should be as big of an area as you want to spread the spawning around, cars will spawn here even if the spawn point is visible by camera. Cars outside of this area will be despawned.
     
  37. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    Thank you for taking the time to explain
    I guess I'll take the option on screen-share (really nice of you to offer this)
    I changed the settings and found out that the previous error with the Jobs is triggered by having a too small Active zone (might be useful for you to know)

    I balanced the things around as you explained, but I can't have more than 5 cars active at the same time. I really don't get why, there are a lot of spawn points and routes covered by the spawn zone

    upload_2020-3-9_0-1-0.png

    edit: The prefab list is a repetition of the same cars I just thought that could have an influence but it's the same with 3 or 9 prefabs in that case
     
  38. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,507
    As I've previously mentioned, I'm working on improving the editor tools for the next update.

    The primary goal is to create a single STS Tools window, where you can access all the functionality that's available in the multiple editor window tools and menu commands. The idea is to select the mode you want to use to enable the tool so the UI is not cluttered.

    During this process I'm also working on improving the tools where possible, the most noticeable improvements being support for undo/redo, handle color customization, solid handle buttons and auto detect/unload data when play mode state or scene changes occur.

    The first tool has been added to this window (Signal Connector) and it's now complete. Here's a preview.

    STS Tools Window.gif

    I don't have an ETA on when I expect to be finished with the other tools. This update will be submitted when all tools are moved to this new window.
     
    mgsvevo likes this.
  39. phattanapon

    phattanapon

    Joined:
    Jul 21, 2014
    Posts:
    10
    Will this work with Left-hand traffic? If not do you have any suggestion for me to experiment?
    Thank you very much.
     
    CoyoteFringe likes this.
  40. JaeHyunNam

    JaeHyunNam

    Joined:
    Aug 2, 2018
    Posts:
    1
    Hello Stephen

    I'm setting waypoints manually.
    Is there an optimal distance between waypoints?

    For example, can there be problems if the waypoints are too close?
     

    Attached Files:

    • 1.png
      1.png
      File size:
      73.8 KB
      Views:
      424
  41. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,507
    You can setup the waypoint routes so the cars drive on left or right side of the roads, there are no special requirements, just make the route in the direction you want cars to travel.
     
  42. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,507
    The distance used in the demo scene is the distance I'd recommend (about 3-5 meters). If the points are to close or far the lane changing accuracy might be reduced. Intersection points can be closer, and most often will need to be close for sharp turns.
     
  43. phattanapon

    phattanapon

    Joined:
    Jul 21, 2014
    Posts:
    10
    That's great. Thank you very much.
     
  44. joeyether40

    joeyether40

    Joined:
    Jan 26, 2018
    Posts:
    20
    Hey, I just set up the system and got it to work in my scene. I am using 2019.2.9 and while it works great with normal setup. If i try to use pooling i get spammed with errors. I have watched all the videos and matched up with the demo scene but am still getting spammed with errors when i try to use pooling. this is the error i am getting:
    NullReferenceException: Object reference not set to an instance of an object
    Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle.CheckWriteAndThrow (Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle handle) (at C:/buildslave/unity/build/Runtime/Export/Jobs/AtomicSafetyHandle.bindings.cs:157)
    UnityEngine.Jobs.TransformAccessArray.GetTransformAccessArrayForSchedule () (at C:/buildslave/unity/build/Runtime/Transform/ScriptBindings/TransformAccessArray.bindings.cs:114)
    UnityEngine.Jobs.IJobParallelForTransformExtensions.Schedule[T] (T jobData, UnityEngine.Jobs.TransformAccessArray transforms, Unity.Jobs.JobHandle dependsOn) (at C:/buildslave/unity/build/Runtime/Jobs/Managed/IJobParallelForTransform.cs:58)
    TurnTheGameOn.SimpleTrafficSystem.AITrafficController.FixedUpdate () (at Assets/TurnTheGameOn/SimpleTrafficSystem/Scripts/AITrafficController.cs:262)
    Also with this error NO cars are generated. Please help
     
  45. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,507
    Thank you for the bug report, and sorry about the error.

    I have a fix for this bug, which when using pooling would not spawn startup traffic as expected, most noticeable in small road networks.

    Can you please email me stephen@turnthegameon.com and I'll send you back the update?

    I'll submit this fix to the store with 1.0.7, most likely next week, if anyone else needs this fix please contact me, thanks.
     
  46. marcell123455

    marcell123455

    Joined:
    Jun 18, 2014
    Posts:
    271
    @Stephen_O Hi,

    I know it dosn´t fit here but I am just interested if you made any progress at the seperate race driver ai system idea you mentioned a while ago?

    thanks :)
     
  47. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,507
    Hi Marcell,

    I don't think I'll be creating any new AI for racers. I did recently make an avatar driver package that can be used with these AI traffic cars. My goal is to continue working on this traffic system until I feel it's complete, so any available dev time is currently spent here.
     
  48. marcell123455

    marcell123455

    Joined:
    Jun 18, 2014
    Posts:
    271
    I mean seperating the AI from the "Racing Game Development Kit" and selling it as a seperate package, not building a complete new one. ;)
     
  49. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,507
    I don't have enough time to do that right now, would prefer to focus my time on improving this asset until it's finished.
     
    marcell123455 likes this.
  50. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,507
    I don't test in alpha or beta versions since they are not stable and may contain undocumented bugs. The best place to ask would be here: https://forum.unity.com/forums/2020-1-beta.377/
     
    kjiforouter likes this.