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

iRDS - Intelligent Race Driver System Available on Asset Store

Discussion in 'Assets and Asset Store' started by rhodnius, Mar 18, 2013.

?

What you prefer (features are, Transmission, differential and Engine as separate component)

Poll closed Nov 12, 2019.
  1. Release new physics at it's current state and do new stuff on next releases?

    0 vote(s)
    0.0%
  2. Wait for all the new stuff on physics to be implemented then do the release?

    100.0%
  1. elijahrockshout

    elijahrockshout

    Joined:
    Apr 6, 2013
    Posts:
    14
    Hello all, not sure if I missed it somewhere, but does iRDS support splitscreen multiplayer?
     
  2. CoderPro

    CoderPro

    Joined:
    Feb 21, 2014
    Posts:
    324
    My car will be instantiated by runtime. So I've checked Instantiate Cars Manually option.
    My car object structor like this:

    Car ------------------- Root GameObject with CarController script (Not moving object)
    ----- Body --------- Rigidbody,... (This is moving object) (IRDSCarControllerAI)
    ----- FL --------- FL Wheel
    ----- FR --------- FR Wheel
    ----- RL --------- FR Wheel
    ----- RR --------- FR Wheel

    I've added IRDSCarControllerAI and IRDSCarControllInput to the Car object. But have the bellow error:
    ullReferenceException: Object reference not set to an instance of an object
    IRDSPlaceCars.AddNewCar (UnityEngine.Object car, System.Boolean isAI) (at <8b8fe767dd3c41c6be19d3943fcf1af9>:0)
    What I am wrong ?

    And How can I instantiate my car object by runtime with AI system without using prefab ?

    Edit:
    Now I've added my AI car by using method: iRDSPlaceCars.AddNewAICar(), but have the bellow error:
    NullReferenceException: Object reference not set to an instance of an object
    IRDSNavigateTWaypoints.NavigateToWaypoints () (at <8b8fe767dd3c41c6be19d3943fcf1af9>:0)
    IRDSNavigateTWaypoints.FixedUpdate () (at <8b8fe767dd3c41c6be19d3943fcf1af9>:0)

    OverflowException
    IRDSCarControllerAI.UpdateOppQuantity () (at <8b8fe767dd3c41c6be19d3943fcf1af9>:0)
    IRDSCarControllerAI.Start () (at <8b8fe767dd3c41c6be19d3943fcf1af9>:0)

    NullReferenceException: Object reference not set to an instance of an object
    IRDSNavigateTWaypoints.GetCarPositionOnTrack () (at <8b8fe767dd3c41c6be19d3943fcf1af9>:0)
    IRDSNavigateTWaypoints.Update () (at <8b8fe767dd3c41c6be19d3943fcf1af9>:0)

    P/s: I've added IRDSCarControllerAI via AddComponent<> to my car object.
     
    Last edited: Sep 15, 2021
  3. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332
    Hello, not out of the box.


    Hello, the car should have those scripts already added to the car prefab that you are going to instantiate for it to work properly, and since i see this is a third party physics or other physics that iRDS you would need also an interface script as the ones in the rar file ExternalPhysicsScripts so it sets the needed stuff on awake :)
     
  4. unity_44234FBC39E5661FBF5B

    unity_44234FBC39E5661FBF5B

    Joined:
    May 11, 2021
    Posts:
    29
    So I imported the package into my project. But I get 4 critical errors that state that there is no overload for 'OnLevelLoaded' matches delegate 'UnityAction<Scene, LoadSceneMode>. This appears for both the menumanager script and championshipsystem script. I have two questions regarding this; Is it safe to delete these if I'm not gonna use them and is this issue a compatability issue?
     
  5. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332
    Weird, those should have been auto updated with the API Updater i think, which unity version you are currently using?

    menumanager script you can delete it without issues.

    Championshipsystem would make you delete some other scripts that access it, but wont interfere with the core scripts
     
  6. justmonotone

    justmonotone

    Joined:
    Sep 21, 2019
    Posts:
    6
    Can either of you share what was done to resolve the issue of all 4 tires turning please. Thanks in advance
     
  7. unity_44234FBC39E5661FBF5B

    unity_44234FBC39E5661FBF5B

    Joined:
    May 11, 2021
    Posts:
    29
    I'm using Unity 2021.1.7f1
     
  8. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332
    Just imported into 2021.1.24f1 without issues, no errors, can you please confirm iRDS version? sounds like you may have an older version, updating it would fix this issue

    Are the rear tires actually steering or there is a feel of lack of tire traction?
     
  9. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332
    Just submitted a new version with a few minor tweaks to the demo scene that I though were already updated on the assets store but seems they were not, so it should be available in the next couple of days
     
  10. unity_44234FBC39E5661FBF5B

    unity_44234FBC39E5661FBF5B

    Joined:
    May 11, 2021
    Posts:
    29
    I have v3.2.6.1.c. Also does it support solid axles?
     
  11. oguzkaancomoglu

    oguzkaancomoglu

    Joined:
    Aug 18, 2021
    Posts:
    48
    Hello,
    I have reviewed your product and it seems to be the most comprehensive product according to what is written. I tried the online demo but I didn't like the car physics very much. In your explanations, you wrote that you integrated your product with edy physics. I have very little software experience so if I buy your product can I entegred with edy physics ? Is this job requires a very good coding knowledge?

    My other question is that I guess I saw it somewhere, is there a cop pursuit mode in artificial intelligence? I want to make a nfs hotpursuit style game as well there will be both racing cars and police chases. Do you have such an example in your application? Can you give some details?
     
  12. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332
    sorry for the late reply, didn't received the email, if you mean that if you could have rear tires without steering, yes it does :)

    for your first question, the package already includes the scripts for integrating it with Edy's VP, depending on which version of Edys VP you are using is a different folder.

    About the second question, iRDS does have a basic cop chasing mode that would spawn cop cars around the race track and would chase the race cars that are closer to them.
     
    oguzkaancomoglu likes this.
  13. unity_44234FBC39E5661FBF5B

    unity_44234FBC39E5661FBF5B

    Joined:
    May 11, 2021
    Posts:
    29
    I mean't like the two wheels on an axle will follow the same rotation of each other.
     
  14. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332
    sure, you need to play with the values of ackerman factor to get it that way, a value of 0 should make them turn exactly the same
     
  15. justmonotone

    justmonotone

    Joined:
    Sep 21, 2019
    Posts:
    6
    Anyone know why my car is hopping when I use the wizard? I was able to replace the prefab wheels interior, lights and body with mine and things work fine. (Time consuming) However, When I use the wizard the car hops, jumps, skips, bounces continuously. Thanks in advance. Also is there a discord. I noticed a invite link on a previous post but the link is expired.
     
  16. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332
    sounds like suspension settings, you could just copy over the ones from the demo cars after you rigged them to get that sorted out, i think it uses the old suspension by default, i might have to update that, you could also edit the actual base prefab of the wheels used by the rig wizard so it have the base settings you want already in there too

    here is a new server link for discord: https://discord.gg/jnWJpDcXN8
     
  17. justmonotone

    justmonotone

    Joined:
    Sep 21, 2019
    Posts:
    6
    Hello what do you mean by base setting? I will try and copy the suspension of the BMW before end of day all let you know if the issue is resolved

     
  18. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332
    Yeah a meant copying the settings
     
  19. keithsoulasa

    keithsoulasa

    Joined:
    Feb 15, 2012
    Posts:
    2,126
    Are you planning on updating the source version too ? I've noticed the DLL version is still being updated.


    Right now I'm getting weird errors , like the grid starting points aren't showing up in the editor.
     
  20. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332
    Hello, the updates currently made to the dll version are about prefabs and scene old stuff, this is the reason why the source version have not been updated, if you could please PM me the errors you are getting to get you sorted out that would be great
     
    keithsoulasa likes this.
  21. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332
    **************Important information**************

    If you are going to use URP or HDRP with iRDS is important to get first the rendering pipeline and after having it on your project then import iRDS unchecking graphics settings from the import wizard to avoid overwriting URP/HDRP graphics settings, if you do it the other way around URP/HDRP would overwrite the project settings of iRDS and you would end up having multiple issues trying to use it
     
  22. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332
    Heads up that there is a bug on the rigging wizard that is causing to get the cars with all tires set as front tires, thus having the issue mentioned by @unity_44234FBC39E5661FBF5B the update would be available right away today!
    Latest version would be V3.2.6.1.f
     
    Last edited: Dec 3, 2021
  23. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332
    If you could share pls the errors you are having that would help a lot, thanks!

    Edit: today was uploaded a new version of the iRDS pro fyi
     
  24. oguzkaancomoglu

    oguzkaancomoglu

    Joined:
    Aug 18, 2021
    Posts:
    48
    Hi, I bought IRDS and I watched some your tutorials I guess I cannot use only car AI system separate from all IRDS system. Is there any way to use it ?

    Detailed explanation of my question:I create almost everything myself in my game (except car physics and artificial intelligence). I chose RCC for car physics and IRDS for artificial intelligence. Here's what I want from IRDS; I will provide quality AI such as waypoint and AI cars going on the road and the conflict between each other, braking on corners with IRDS but I will do other basic operations myself such as starting the race, creating the vehicles on the road, ending the race (i.e. managing the race). But I realized it's not like that in IRDS. I wonder if I have a chance to use AI only on cars, except for the current IRDS system, or does the system always work as a whole?

    with all respect.
     
  25. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332
    Thanks for your purchase!

    With iRDS you can spawn the cars on your own and register them to the system so they can see each other on the track, you can also start the race manually, and you should be able to finish the race on each car too by using the method SetEndRace on IRDSCarControllerAI class on each car, so i think you should be able to do what you described :)
     
  26. oguzkaancomoglu

    oguzkaancomoglu

    Joined:
    Aug 18, 2021
    Posts:
    48
    Thank you for your answer but I need to ask a few more questions. For example When vehicles occur on the road, IRDS automatically creates the driver (users) vehicle but I want to spawn player car by myself also I guess IRDS made race start animation itself and I can't change it so actually I just want to take advantage of the AI of IRDS. I want to build and do all the parts of game except AI. The reason why I want to create the User car myself is more customizations, tests on different physics engines, different game starts etc.
     
  27. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332
    Sure you can do that, iRDS have an option for you to manually instantiate all the cars and you just need to register the cars with iRDS so they can see each other, you can also disable the track preview animation and start the race manually
     
    oguzkaancomoglu likes this.
  28. oguzkaancomoglu

    oguzkaancomoglu

    Joined:
    Aug 18, 2021
    Posts:
    48


    Yes, now I've looked at what you said and I've seen it all also I read the "Readme" document. After every feature I see, my respect increases for your work. You really did a great job. I want to ask one more thing, but I didn't know if I should write from here or from your Discord page. I am quite a novice as I am a beginner in this business. I hope my simple questions don't bother you :)
    My question is I'm going to create the cars manually(both user and AI) and I guess I need to access variables using classes.The reason why I created a manual car is that I will categorize the vehicles as sport, super and hyper. The class of the car selected by the user must be of the same class with AI cars. Actually, I'm doing this right now without using your app so I choose a vehicle from the menu and I create AI vehicles according to the class of the selected vehicle, but the AI vehicles are not related to IRDS.

    In the document, I did not fully understand how to register AddNewPlayerCar and AddNewAICar from the IRDSPlaceCars class. Also, as far as I understand from the code, We can associate an object, so can we give a car list? How should I do the matching? Can you help me ?
    (Edit: I added the user car, cars must be registered with IRDS but I still don't know how to add AI car list)

    The IRDSPlaceCars script is very confusing. According to which function do I need to process, there are 2 of each.
    upload_2021-12-15_13-16-53.png



    If you say what I did, I created an empty object and wrote a script. I wrote the following codes in the code content. upload_2021-12-15_13-28-13.png


    I associated a vehicle and the 2 objects above, but unfortunately it didn't work.
    upload_2021-12-15_13-28-59.png
     
    Last edited: Dec 15, 2021
  29. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332
    In your case you could use for the player:
    public IRDSCarControllerAI AddNewPlayerCar(Object car, IRDSPlayerSettings controls, string driverName)

    you pass the prefab of the car and iRDS would instantiate it for you (which would be simpler for what you want i think) and for the AI use the other one:
    public IRDSCarControllerAI AddNewAICar(Object car, Color carColor, string driverName, params DriversSettings[] specificDriverSetting)
     
    oguzkaancomoglu likes this.
  30. oguzkaancomoglu

    oguzkaancomoglu

    Joined:
    Aug 18, 2021
    Posts:
    48
    Thank you for information thats all worked. I have a few small questions. After I wrote the codes, I got some errors, one of them was the color determination code. Actually I couldn't find how to write it, can you give an example for this?

    upload_2021-12-16_20-8-12.png

    Second question is: I can't start the user car from the grid position I want. I saw the "gridPosNumber" variable in the "IRDSPlayerSettings" class, I could not change the order with the number that I gave. Where am I doing wrong ?

    thank you for answering
     
  31. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332
    You're welcome!

    For using assigned grid positions you need to enable it on the level load options so you can actually use that, but then you must assign it for all the cars on the race including the AI.

    for the colors, thats an array of colors, you could have that on the inspector or just used the ones already on levelload which are already exposed there and you can access them with the singleton like
    Code (CSharp):
    1. IRDSLevelLoadVariables.Instance.carAiColors
    Also make sure the Selected Car Name does match the prefab name i see you have there "3" not sure if thats the name of your car prefab, if it is, all good then :cool:
     
  32. oguzkaancomoglu

    oguzkaancomoglu

    Joined:
    Aug 18, 2021
    Posts:
    48
    I adjusted the grid positions of the cars, but I couldn't do the color process again :( , I guess I don't have enough coding knowledge so I couldn't do it. I wrote as below but got error again

    Code (CSharp):
    1.      selectedCarColor = IRDSLevelLoadVariables.Instance.carAiColors,
    I don't want you busy with this at the moment. I'll take a look here again after I've done the other parts.

    Thank you for your last post, actually I was going to ask, you saw and answered :) I fixed the "car name" part.

    Also, the "Edy Vehicle Physics integrate" video posted on youtube was very helpful.
     
    rhodnius likes this.
  33. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332
    which error you are getting? sounds like you may be trying to assign a color array to a color field maybe?
     
  34. oguzkaancomoglu

    oguzkaancomoglu

    Joined:
    Aug 18, 2021
    Posts:
    48
    Error description that I get :
    NullReferenceException: Object reference not set to an instance of an object
    IRDSPlaceCars.AddNewPlayerCar (UnityEngine.Object car, IRDSPlayerSettings controls, System.String driverName) (at <0c52ae01469c4e98a6bfc1d0cea88cdb>:0)
    CarSpawn.Start () (at Assets/Scripts/CarSpawn.cs:243)




    I created one empy object (CarSpawn) and connected it with this code

    upload_2021-12-23_15-29-19.png
    The code I wrote is as follows:

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. public class CarSpawn : IRDSPlaceCars
    6. {
    7.  
    8.     public GameObject UserCar;
    9.     public GameObject AICars;
    10.         public void Start()
    11.         {
    12.  
    13.             var UserCarSettings = new IRDSPlayerSettings()
    14.             {
    15.  
    16.                 playerName = "PlayerName",
    17.  
    18.                 selectedCarColor = IRDSLevelLoadVariables.Instance.carAiColors,
    19.  
    20.                 selectedCar = "Mustang",
    21.  
    22.                 carNumber = "3",
    23.  
    24.                 controlDigital = true,
    25.  
    26.                 automaticGearShifting = true,
    27.  
    28.                 automaticClutch = true,
    29.  
    30.                 startEngineOnStart = true,
    31.  
    32.                 pitsAutoPilot = true,
    33.  
    34.                 autoSteering = false,
    35.  
    36.                 autoBrake = false,
    37.  
    38.                 autoThrottle = false,
    39.  
    40.                 preferredCameraView = "",
    41.  
    42.                 // gridPosNumber = 2,
    43.  
    44.                 imACop = false,
    45.  
    46.                 enableTCL = false,
    47.  
    48.                 tcl = 0.45f,
    49.  
    50.                 tclMinSpd = 1f,
    51.  
    52.                 enableABS = false,
    53.  
    54.                 abs = 0.4f,
    55.  
    56.                 enableESC = false,
    57.  
    58.                 esc = 1f,
    59.  
    60.                 enableSteerHelp = true,
    61.  
    62.                 steerHelp = 0.01f,
    63.  
    64.  
    65.  
    66.             };
    67.  
    68.  
    69.             var AICarSettings = new DriversSettings()
    70.             {
    71.  
    72.             };
    73.  
    74.        
    75.             AddNewAICar(AICars, Color.red, "testName", AICarSettings);
    76.  
    77.             AddNewAICar(AICars, Color.red, "testName", AICarSettings);
    78.  
    79.             AddNewAICar(AICars, Color.red, "testName", AICarSettings);
    80.  
    81.             AddNewAICar(AICars, Color.red, "testName", AICarSettings);
    82.  
    83.             AddNewAICar(AICars, Color.red, "testName", AICarSettings);
    84.  
    85.             AddNewPlayerCar(UserCar, UserCarSettings, "UserName");
    86.  
    87.  
    88.  
    89.         }
    90.     }
     
  35. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332

    Oh sorry, you should not derive from IRDSPlaceCars class, you should use the singleton of it instead in your own script that derive from Monobehaviour and make sure the IRDSMainManager GameObject with all the needed scripts is on the scene you are going to use it (this is all added when you add IRDSManager using the IRDS menu to add it)

    Let me know how it goes
     
  36. fredastaire

    fredastaire

    Joined:
    Sep 10, 2017
    Posts:
    90
    Is there any plans to make an interface script with nwh2 as it is completely different drivetrain so the nwh interface doesn’t work?
     
  37. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332
    sure! should be pretty straight forward to create it
     
    Sowel44 likes this.
  38. fredastaire

    fredastaire

    Joined:
    Sep 10, 2017
    Posts:
    90
    Thank you
     
    rhodnius likes this.
  39. fredastaire

    fredastaire

    Joined:
    Sep 10, 2017
    Posts:
    90
    You do have to turn off auto set input on nw2 for it to work properly
     
    rhodnius likes this.
  40. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332
    Thanks!

    I Could include it on the asset if is ok @fredastaire
     
  41. fredastaire

    fredastaire

    Joined:
    Sep 10, 2017
    Posts:
    90
    Yeah that’s fine that’s why I made it public I can post the editor script too
     
  42. oguzkaancomoglu

    oguzkaancomoglu

    Joined:
    Aug 18, 2021
    Posts:
    48
    After many processes, I looked at the color selection of the vehicles again. If I understood what you said correctly, I did the following, but there was no color selection.

    I chose the color from the levelload section.

    upload_2022-1-24_15-34-22.png


    I changed the code as you requested
    upload_2022-1-24_15-33-54.png






    Code (CSharp):
    1.  
    2. public class CarSpawn : MonoBehaviour
    3. {
    4.  
    5.     public int ChoosedCarIndexSPC;
    6.     public int ChoosedOpponentNumberSPC;
    7.     public GameObject[] AICarsList;
    8.     public GameObject[] UserCars;
    9.     public GameObject AICars;
    10.     public IRDSPlaceCars ıRDSPlaceCars;
    11.  
    12.  
    13.     public void Start()
    14.     {
    15.      
    16.  
    17.         var UserCarSettings = new IRDSPlayerSettings()
    18.         {
    19.  
    20.            selectedCarColor = IRDSLevelLoadVariables.Instance.carAiColors,
    21.  
    22.         };
    23.  
    24.         var AICarSettings = new DriversSettings()
    25.         {  };
    26.  
    27.  
    28.         AICarsList = null;
    29.  
    30.  
    31.  
    32.         for (int i = 0; i < ChoosedOpponentNumberSPC; i++)
    33.         {
    34.             int RandomValueForAI = Random.Range(0, AICarsList.Length);
    35.             ıRDSPlaceCars.AddNewAICar(AICarsList[RandomValueForAI], Color.red, "testName", AICarSettings);
    36.  
    37.         }
    38.  
    39.         ıRDSPlaceCars.AddNewPlayerCar(UserCars[ChoosedCarIndexSPC], UserCarSettings, "oguzkaancomoglu");
    40.  
    41.     }
    42.  
    43. }
     
  43. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332
    Hmm but you are sending an empty list there (AICarList = null) so not sure what you are trying to do there, you could use IRDSLevelLoadVariables.Instance.firstPlayerSettings directly and define all your settings on the inspector on levelload object, that way you dont have to be handling that manually, same for AI settings you can use directly IRDSLevelLoadVariables.Instance.driverSettings which is the array of AI settings instead of creating new ones :)
     
  44. oguzkaancomoglu

    oguzkaancomoglu

    Joined:
    Aug 18, 2021
    Posts:
    48


    Actually the list is not empty I fill it manually from the inspector menu(The purpose of the null command is written to empty the list if it is already full). Normally I set a class based on the type of vehicle selected from the menu(sport, hyper ie.) In this way, the user encounters a rival in the class of the car he chooses. I trimmed the code for simplicity. Yes, I'm a newbie in these things, but I'm not bad enough to leave an empty series :)
    upload_2022-1-27_14-36-41.png



    Let's come to our problem,

    What you said I actually did another type before and I'm pretty sure these processes are working. For example, I can give a user name and I can observe it in the table when the race is over. Right now I'm giving a variable for the color but somehow it doesn't show it in the car. For example for AI cars, I writed the code

    Code (CSharp):
    1. ıRDSPlaceCars.AddNewAICar(AICarsList[RandomValueForAI], Color.white, "testName", AICarSettings);
    When the game is over, the name of the AI car appears as the testname. But the color I have assigned as white here is not visible in the car. Giving name is working but giving color is not working why ??

    Then I used below code for User car
    Code (CSharp):
    1. ıRDSPlaceCars.AddNewPlayerCar(UserCars[ChoosedCarIndexSPC], UserCarSettings, "oguzkaancomoglu");

    Here I have gave UserCarSettings varilable and values. Unfortunately, I can't see the color in the user car. I think you defined color as an array,but I could not understand the reason.
    I defined an array of variables for the color. I defined one indexed array


    public Color32[] color2 = { new Color(255, 128, 0, 255)};

    selectedCarColor = color2, I wrote. Again, no result.

    I did everything you said but it still didn't work :(

    Code (CSharp):
    1. IRDSLevelLoadVariables.Instance.firstPlayerSettings.selectedCarColor = color2;


    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5.  
    6.  
    7.  
    8.  
    9. public class CarSpawn : MonoBehaviour
    10. {
    11.  
    12.     public int ChoosedCarIndexSPC;
    13.     public int ChoosedCarLevelSPC;
    14.     public int ChoosedOpponentNumberSPC;
    15.     public int ChoosedCarColorIndexSPC;
    16.  
    17.  
    18.  
    19.     public GameObject[] AICarsLevel0;
    20.     public GameObject[] AICarsLevel1;
    21.     public GameObject[] AICarsLevel2;
    22.     public GameObject[] AICarsLevel3;
    23.     public GameObject[] AICarsList;
    24.     public GameObject[] UserCars;
    25.     public GameObject AICars;
    26.  
    27.     public GameObject ChoosedUserCar;
    28.  
    29.  
    30.     public IRDSPlaceCars ıRDSPlaceCars;
    31.  
    32.  
    33.     public Color32[] color2 = { new Color(255, 128, 0, 255)};
    34.  
    35.  
    36.     public void Start()
    37.     {
    38.  
    39.  
    40.         var UserCarSettings = new IRDSPlayerSettings()
    41.         {
    42.             playerName = "PlayerName",
    43.  
    44.             selectedCarColor = color2,
    45.  
    46.             selectedCar = "Mustang",
    47.  
    48.             carNumber = "3",
    49.  
    50.         };
    51.  
    52.      
    53.         var AICarSettings = new DriversSettings()
    54.         {    };
    55.  
    56.  
    57.        AICarsList = null;  // for clear list before add object
    58.  
    59.         if (ChoosedCarLevelSPC == 0)
    60.         {
    61.             AICarsList = AICarsLevel0;
    62.         }
    63.         if (ChoosedCarLevelSPC == 1)
    64.         {
    65.             AICarsList = AICarsLevel1;
    66.         }
    67.         if (ChoosedCarLevelSPC == 2)
    68.         {
    69.             AICarsList = AICarsLevel2;
    70.         }
    71.         if (ChoosedCarLevelSPC == 3)
    72.         {
    73.             AICarsList = AICarsLevel3;
    74.         }
    75.      
    76.  
    77.         // for AI
    78.         for (int i = 0; i < ChoosedOpponentNumberSPC; i++)
    79.         {
    80.             int RandomValueForAI = Random.Range(0, AICarsList.Length);
    81.            ıRDSPlaceCars.AddNewAICar(AICarsList[RandomValueForAI], Color.white, "testName", AICarSettings);
    82.  
    83.         }
    84.  
    85.  
    86.  
    87.         ıRDSPlaceCars.AddNewPlayerCar(UserCars[ChoosedCarIndexSPC], UserCarSettings, "oguzkaancomoglu");
    88.  
    89.  
    90.       //  IRDSLevelLoadVariables.Instance.firstPlayerSettings.selectedCarColor = color2;   // I tested
    91.  
    92.     }
    93.  
    94.  
    95.  
    96. }
     
  45. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332
    Hmm sounds like you might be missing the setting for setting which shader and property name the system should use in order to change the car colors, you set that on levelload object on the car settings section:

    upload_2022-1-27_18-26-21.png
     
  46. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332
    if you could share it that would be great!
     
  47. vincespeed

    vincespeed

    Joined:
    Mar 8, 2014
    Posts:
    70
    Hi there Rhodnius! I have a new question for you :) I'm on IRDS v 3.2.6.1, and nowadays I'm experimenting with changing tyres from "Default" to "Arcade". I think my users may enjoy a more aracadish driving style, and everything seems to work pretty well, except the fact that the car can't seem to go on a straight line.
    At the beginning of the race, the car goes perfectly straight until I touch the steering. After touching the steering buttons, the car seems to have a slight drift toward the side I pressed the steering to. At high speeds it forces the player to constantly press left-right in order to correct the trajectory.
    The issue can't be reproduced with "Default" tyres: the car always proceed in a straight line when no steer input is passed.
    I hope you have a solution to this issue. I've checked the "steer input" when the problem occurs, but it's 0 so it surely does not depend on steering input.
     
  48. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332
    Thanks for reporting this issue, would be taking a look this weekend to check what the problem is and would then be back with an answer

    Cheers
     
  49. vincespeed

    vincespeed

    Joined:
    Mar 8, 2014
    Posts:
    70
    I always appreciate that you keep helping customers in the long term, it's an invaluable add on to your products!
     
  50. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332
    I'll get it sorted out this weekend, and would get back to you here :)