Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity 2020 LTS & Unity 2021.1 have been released.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

►► Arcade Racer: Racing Game Development Kit

Discussion in 'Assets and Asset Store' started by Stephen_O, Jan 21, 2016.

  1. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,443
    Hello,

    1. The races are separate scenes, their settings are stored on scriptable objects. The triggers can be assigned a race scriptable object, which also knows the scenes name. When the trigger is entered, the assigned race scene is loaded. You can create multiple versions of your open world, and setup a race in each, then have those scenes loaded on trigger to create open world events, or load into standalone race scenes on tracks, etc.

    2. Sure, I can add that as an option. Watch the mobile template's forum thread for update when I submit it.

    3. Yes, the AI waypoint routes are modular, you can create branching routes, if multiple connections are available the car will pick one at random.

    4. Yes, but there is currently no logic to auto trigger nitro for AI cars, so it's never really used there. Nitro On/Off scripting calls can be made, so it's possible to setup a trigger for ai nitro zones.

    5a. No multiplayer plans, it was a feature when UNET was available, but Unity abruptly removed that service after advocating and promoting it. They did not replace it with anything. That was a huge waste of development time that caused me to rewrite and throw away parts the project.

    5b. There's no roadmap, it's best to focus on what's currently available in the public releases, I don't want anyone to purchase something from me for what I might add, or plan to add in a future release. The next major asset upgrade will be version 2.0, which will include a restructure where the standalone template project is moved to it's own asset (similar to how the mobile template is setup), and get some of the updates from the new mobile template, like spline route creator for races added. This will fully modularized all parts of the kit, allowing users to more easily use only the part they need for a current project, and allowing me to iterate on updates easier with all included assets being separated.
     
    rohitpradeep likes this.
  2. rohitpradeep

    rohitpradeep

    Joined:
    Feb 23, 2017
    Posts:
    9
    thank you for taking time to reply :)
    Appreciate the detailed explanations
     
    Stephen_O likes this.
  3. rohitpradeep

    rohitpradeep

    Joined:
    Feb 23, 2017
    Posts:
    9
    Hi Stephen... i have purchased your asset and have been playing with it for last few days..
    amazing asset...so many features and modular as well! thank you for making this asset !
    I do have some difficulty with the car controller .. and was hoping you could help out...
    - the moment the car its a wall or another car it sorta gets stuck or turns around, any settings to make it feel more arcade type ?
    - when i press the reverse key, how do i configure the gear shift to avoid Neutral and go directly to R. ?
    - what vehicle settings do you recommend to get a good drift when taking corners ?
     
  4. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,443
    Hello,

    I'm glad you're enjoying the asset!

    There's a good amount of physics changes you can make to the components used by the cars to change their behavior.
    For the collision, try assigning the "Car Body" to the player car collider, it's located at:
    Assets\TurnTheGameOn\Arcade Racer\PhysicsMaterials\Car Body

    Default values will help, and the settings should help control collision friction, you can learn more about physics materials here (these can also be applied to wall and AI car colliders):
    https://docs.unity3d.com/2019.3/Documentation/Manual/class-PhysicMaterial.html


    The UI displays the gear based on current speed, pressing and holding back arrow will break until 0, then reverse. Unfortunately there's not an easy option to reconfigure this. If you'd like to change the logic, you can rewrite the CarDriveSystem.ApplyDrive method lines 200-260, this is where input is processed.


    You can adjust the car's wheel colliders forward/sideways friction to achieve more drift-like behavior, this will take some trial and error. Here's a link to the docs to explain what those settings do:
    https://docs.unity3d.com/Manual/class-WheelCollider.html


    The arcade racer project does support Edy's Vehicle Physics as an alternate option to the default player car prefab, it allows for more customization over physics settings. This might be worth looking into as an option. Since that asset specifically focuses on physics you may be able to get results you desire.
     
    rohitpradeep likes this.
  5. rohitpradeep

    rohitpradeep

    Joined:
    Feb 23, 2017
    Posts:
    9
    Thanks Stephen for the advise..I shall try it out and let you know! (y)
     
    Stephen_O likes this.
  6. calin7514

    calin7514

    Joined:
    Dec 16, 2017
    Posts:
    3
    Is there any way I can make the AI cars move faster?
     
  7. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,443
    You can increase the value 'Full Torque Over All Wheels' on the car settings.
     

    Attached Files:

  8. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,443
    Version 1.8.20 submitted.

    • Removed unused scene view 'Test Button' from CarAIWaypoint component.
     
  9. keithsoulasa

    keithsoulasa

    Joined:
    Feb 15, 2012
    Posts:
    2,084
    Does this support Eddy Physics ?

    I'm using a different system now, but this could be a good backup if things go wrong.
     
  10. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,443
    Yes, here's an integration tutorial/demo video:

     
  11. Justin_Wingfall

    Justin_Wingfall

    Joined:
    May 15, 2014
    Posts:
    122
    Ill be ok with regular physics, if it didnt feel like driving a paper plate.
     
  12. SarhanSoft

    SarhanSoft

    Joined:
    Apr 15, 2015
    Posts:
    57
    Is there any tutorial how can i setup new car model?

    when im trying to change some IK avatar for hands, but they reset location after start game.
    upload_2021-4-4_22-42-20.png
     
  13. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,443
    The video tutorial at 1:05:32 shows the setup process for creating a new car prefab:



    The avatar driver specifically is at 1:10:45

    You might also find this tutorial helpful:

     
  14. SarhanSoft

    SarhanSoft

    Joined:
    Apr 15, 2015
    Posts:
    57
    thanks i sove the issue
    for now i want to make some connect in my traffic system like your demo (open world) see this image please
    upload_2021-4-5_16-7-41.png
    I have no use light traffic because my scene not contain any light traffic.
    so how can i make connect between these roads?
     
  15. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,443
    There's detailed information/tutorial in the documentation:
    Assets\TurnTheGameOn\Documentation

    starting on page 38, it discusses how to use AIWaypointRoutes. You'll need to connect the start/end waypoints using the OnReachWaypointSettings NewRoutePoint array. When an AI car reaches the end of a waypoint route, it will use this array and choose a random point from it to use as a new route.
     
    SarhanSoft likes this.
  16. SarhanSoft

    SarhanSoft

    Joined:
    Apr 15, 2015
    Posts:
    57
    Thanks @Stephen_O
    im working around Traffic system. and i face two issues not effect my project but still confiuse me when im working.
    The first one, this Empty Game Object called "IK_Driver_Waypoint_Gizmo_Helper" still dublicate himself even if i delete it.

    The second one, this bug come when i open another scene then back to the scene have traffic system

    please look the images in the below
    upload_2021-4-7_16-8-27.png
     
  17. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,443
    Thank you for reporting this bug. I believe it might be caused by a change in recent Unity versions, but not sure. To resolve, please do the following:

    Change line 189 in CarAIWaypointRoute script:
    Assets\TurnTheGameOn\Arcade Racer\Scripts\Car\AI\CarAIWaypointRoute

    from
    Code (CSharp):
    1. arrowPointer.hideFlags = HideFlags.HideAndDontSave;
    to
    Code (CSharp):
    1. arrowPointer.gameObject.hideFlags = HideFlags.HideAndDontSave;
    I believe the error and duplicating object are both cause by this bug. After updating the script, you should be able to delete the objects, and not see any errors.
     
    SarhanSoft likes this.
  18. DethKwok

    DethKwok

    Joined:
    Mar 13, 2017
    Posts:
    10
    Hi, Would you ever released just the AI Driver/Waypoint systems separately? Having trouble with another AI Driver asset, looking for alternatives.

    Thanks for keeping this up to date btw.

    EDIT: Also is the traffic system in this the same as your standalone?
     
    Last edited: Apr 8, 2021
  19. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,443
    Hello,

    Simple Traffic System AI is similar, but more focused on providing an improved traffic system (more tools, features, and optimizations). However it's not designed for racing, so may not be as good for that as the AI in this template. I also have a separate IK Avatar Driver asset that can be used with Simple Traffic System to allow animated humanoid models in the AI cars.

    I don't think I will release a racing specific AI system as standalone.
     
  20. SarhanSoft

    SarhanSoft

    Joined:
    Apr 15, 2015
    Posts:
    57
    Thanks, it solved the bug.

    For now i have notic two more points:
    One, the boxs gizmo still view even in Play mode, i try with Waypoint settings but still not hide in Play Mode.

    Two,
    The car tries to go to the next point on the straight road, but suddenly decides to turn to the right.
    If the last point in the lane gives two turning points (one for the right and the other for the left), the car always chooses the first lane point. Sometimes the car suddenly decides to return to a back point, even though there is no connection to a back point. Or turn too much to hit a wall. I think that the explanation is a little complicated, but I can share with you the project files to preview it directly, so maybe the defect is from me and it may be from the codes

    upload_2021-4-8_20-7-33.png

    anyway, i have make a video to be more clear about my issue.


    Again, if you like see a copy from my project it not problem.
     
  21. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,443
    You can toggle of gizmos in the top right corner of scene view by clicking the Gizmos button.

    For the cars that are acting strange, it looks like your some of your OnReachWaypointSettings might have incorrect NewRoutePoint assignments. The green line from the car to the next point does not look correct. I would recommend checking the settings when the green line does not draw to the next point when the car reaches a waypoint. In some cases it looks like the green line is pointing to a completely different route point.
     
  22. SarhanSoft

    SarhanSoft

    Joined:
    Apr 15, 2015
    Posts:
    57
    I have try to switch off gizmo but these box still not hide.
    upload_2021-4-10_15-2-35.png

    in Scene window
    and in Game window
    even if i start play mode
     
  23. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,443
    Those are actually Mesh Renderers, not gizmos. You can disable them on the spawned object in the scene, and/or on the prefab so they are disabled by default if you like.

    CarAIWaypoint.jpg CarAIWaypointPrefab.jpg
     
    SarhanSoft likes this.
unityunity