Search Unity

Mobile Traffic System - City traffic for games

Discussion in 'Assets and Asset Store' started by GleyGames, Jun 5, 2021.

  1. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello @chol-ee !
    1) I wanted 50 cars to run on the road, so I set NrOfVehicles =50, but only 7 to 10 cars were spawned near the PLAYER object. How can I show all 50 cars(Or at least 30 cars) on the road?
    ->NrOfVehicles is represents how many vehicles are presented on the scene simultaneously. This is the value which you set by your own. You can use GleyTrafficSystem.Manager.SetTrafficDensity(nrOfVehicles); please check the documentation for complete API methods. https://gleygames.com/documentation/Gley-TrafficSystem-Documentation.pdf
    There will not be all the cars in the sight of view because they are randomly generated in the 9 grid cells (in the same as the player cars and the 8 around it). To have a higher traffic flow in the area of your player car, set a higher number to NrOfVehicles and/or decrease the grid cell size.
    Watch this video to understand better how to set these values:


    2) Also, once the cars reached the end of waypoint, they just disappear, and no additional cars were spawned, so I ended up with no cars on roads. How can I make MTS respawn cars on the road?
    ->The cars do not disappear if they are in the player's car view because this is not natural. i mean both game view or scene view. if you see the cars in the view, they will continue to be there (and not respawn anywhere else- you can check that in the hierarchy as well).

    3) I would like to let some cars visit some places(let's say a gas station), stay there for seconds (for filling gas), and move back to the original routes, I guess I can definitely do most of works by using car types, editing waypoints and vehicle waypoint features. However, I have no idea how I can stop cars at the gas station for seconds. What would be the most handy approach to make a car type stop at some specific positions for some time?
    ->This is not a feature of our package and we do not offer technical support on it. Thanks for understanding!

    For further technical support and to check the answer we game to the same or other curiosities, join our Discord group: https://discord.com/invite/7eSvKKW
     
    Last edited: Jan 16, 2023
  2. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello @reighlee !

    Please enable the debug AI in the Gley settings window and let us know via Discord messages on the support channel what happened to your car (what is its state, with captures) if you do not manage to solve it. https://discord.com/invite/7eSvKKW

    Have a great day!
     
  3. Muddasir

    Muddasir

    Joined:
    Jul 25, 2015
    Posts:
    3
    gley traffic not working in ios games...
     
  4. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello! We assure it works for both Android and IOS and many clients are satisfied with it!

    If you encountered issues, access the technical support channels on Discord (https://discord.com/invite/7eSvKKW) and ask your questions there.
    Please, be respectful and do not blame the work we put in our package if you do not managed to configure it...
     
  5. buaawangzhaojie1995

    buaawangzhaojie1995

    Joined:
    Mar 9, 2023
    Posts:
    1
    Hello! I would like to inquire about the following issues.
    (1) Whether the API supports AI vehicles to change routes in runtime or to perform route planning.
    (2) Whether it is possible to overwrite the car-following and overtaking behaviors of AI vehicles. for example, writing new car-following and overtaking model(actions),including behavioral intent (lane change intent).
    (3) whether the asset supports multi-player, whether it can support multiple clients running in the same map.
    (4) Whether it can achieve the communication between vehicles, that is, vehicles can obtain each other's position and speed information.
     
  6. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello,
    1. Route planning is not supported, but waypoint information is publicly available so you can create your own AI system if you want.
    2. Currently it is not possible. We are planning to do it in the future, but if it is mandatory for you, don`t wait for it.
    3. Multiplayer support has nothing to do with the asset, you need to to the network sync on your own using Photon or other multiplayer choice of your own. You can have more players in the same app and traffic cars will account for all of them if that is what you are asking.
    4. Vehicles drive independent from each other, but all are stored inside an array so you can get any information you want about them in an easy way.
     
  7. alicodeacm

    alicodeacm

    Joined:
    Apr 17, 2022
    Posts:
    1
    I want to find the number of cars on a specific road.
     
  8. schrotti26

    schrotti26

    Joined:
    Oct 4, 2020
    Posts:
    3
    Hi there,
    i got a question regarding the features:
    My streets are all around the 3D space so the might not always be tilted only along one axis, most of them are along 2. Is it possible for the cars to navigate along these meshes? How do you handle the roads?
    Or does it only work along streets that are only tilted on one axis?

    Thanks a lot
     
  9. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    That functionality is not included in our asset, sorry
     
  10. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello, if you want your cars to drive upside down, that is not possible. The system is designed for realistic environment (flat, hills, mountains) and it works in XZ plane and Y up axis. If you want to change those axis it will not work out of the box, you need to reconfigure the code to use your axis.
    Also it uses waypoints to navigate, so the road mesh is not relevant for navigation
     
  11. Gleb_Palchin

    Gleb_Palchin

    Joined:
    Jan 7, 2016
    Posts:
    22
    Hi, I keep getting an error because the SO with settings breaks down on its own, what can I do about it? I am using unity version 2022.2.17 upload_2023-5-4_10-38-14.png
     
  12. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello,
    It says you are trying to add the window multiple times. Also it says you have no script attached to the Scriptable object container. Make sure your package is properly installed and it contains all the scripts. Maybe some got deleted by mistake.

    Can you describe what are you trying to do and offer some steps to reproduce your issue?

    You can join our discord server for faster support: https://discord.gg/7eSvKKW
     
  13. haleler51

    haleler51

    Joined:
    Apr 9, 2015
    Posts:
    30
    How extensible is the core system here? Would it be possible for a user to add in their own accident system using this asset, or police chases, etc...? Or is the core system very locked in?

    Also if I understand correctly, motorcycles or any two wheeled vehicle isn't supported?
     
  14. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello,
    All the code is available, but we admit is not so modular as we would like to, so extending it might seem hard.
    2 wheel vehicles are not possible due to gravity (they fall). If you extend out vehicle class for 2 wheel cars, thy will be able to drive.
     
  15. Marcos-Elias

    Marcos-Elias

    Joined:
    Nov 1, 2014
    Posts:
    159
    Hello, your asset looks really amazing!
    Before purchasing it I would just like to verify if this is possible:

    1 Does it accept creating the waypoints in runtime, based on a list of transforms? I have already my own traffic system, I would like replacing it without having to edit the paths on the editor manually. Also my game has user mods, where everything is created in runtime.

    2 Do you know if it works with floating origin scripts? I rely on that for very large worlds. After a few seconds or minutes I must reposition the entire world by moving all the loaded objects to keep the camera near the origin. Many other assets that uses Physics with moving objects don't play well with that.
     
  16. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello,
    1. Unfortunately creating waypoints at runtime it is not possible. This system does not work on dynamically generated worlds.

    2. It can be made to work, but there is no API created for that, you need to do it on your own.

    As I see it this asset is not for you...
     
    Mark_01 and Marcos-Elias like this.
  17. asadali799

    asadali799

    Joined:
    Jul 6, 2022
    Posts:
    3
    upload_2023-10-26_11-2-19.png
    What happen with it i have setup traffic just now
     
  18. asadali799

    asadali799

    Joined:
    Jul 6, 2022
    Posts:
    3
    upload_2023-10-26_11-3-52.png

    Can you help me with it i have just setup all scene but now editor is not working
     
  19. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Please fix all errors inside your console so that the scripts can compile and load.

    I am not notified when a new message is posted here, please use our discord channel for faster support:
    https://discord.com/invite/7eSvKKW
     
  20. BathroomGhost

    BathroomGhost

    Joined:
    Jul 3, 2023
    Posts:
    1
    Hello, planning to purchase this plugin for a driving game I am currently developing for my thesis. Quick question tho, can you provide me insights on what pathfinding algorithm was used for the traffic system as I need to state this in my paper?
     
  21. osnovabraw

    osnovabraw

    Joined:
    Oct 8, 2023
    Posts:
    1
    Hello! When adding traffic to my project, the cars start jerking back and forth when driving
     
  22. shafei1

    shafei1

    Joined:
    Dec 8, 2021
    Posts:
    2
    Hi Gley, I I have the traffic scenario created, I have an issue though as I am using a car called Anycarai in teh traffic scenario that is external to the gley system it was driving on the roads before I activated the gley system now it falls through the road. how would I assign this new car a layer needed so that it does not fall through the road.