Search Unity

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. Legendary_keith

    Legendary_keith

    Joined:
    Apr 21, 2015
    Posts:
    9
    Hey Rhodnius,
    I have an issue with how the AI is behaving, it's constantly braking and driving to slow (even when the racing line is green). What should I do? That white BMW in the video is the AI.
     
  2. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,169
    Are you using iRDS physics or third party? One thing that comes to my mind would be the AI settings on the levelload object you may have there, check for cornering speed factor which should be between 1.3 to 1.6 more or less
     
  3. Freznosis

    Freznosis

    Joined:
    Jul 16, 2014
    Posts:
    214
    Hi.

    I was testing NWH Physics with IRDS in a new clean project, and I can't get the car to drive. The AI is working fine, but none of my inputs work. I looked at the IRDSCarControllInputNWH script and noticed it had this line

    Code (CSharp):
    1. if (carInputs.auto1 || carInputs.auto2 || carInputs.auto3)
    2.             {
    3.                 PlayerController();
    4.             }
    When the race starts, none of these booleans are set to true so PlayerController() never gets called and you can't control the car. How is this script supposed to work? What does auto1, auto2, and auto3 do? They named very weird instead of something more useful to be able to know what's going on.

    I'm using a work-around right now but I would like to get this script clean and working like normal.
     
    Last edited: Dec 3, 2019
  4. Legendary_keith

    Legendary_keith

    Joined:
    Apr 21, 2015
    Posts:
    9
    I'm using IRDS physics. I changed the cornering speed factor (see first picture) but the car is still driving slow.
     
    Last edited: Dec 3, 2019
  5. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,169
    Those are for some internal use but you are totally correct the naming is not good, and is going to be replaced soon to more cleancode ones.

    Hmm that should also just should run if the actual car is player controller which is checking the CarPilot bool from carInputs there, so you could just add something like:

    Code (CSharp):
    1. if (carInputs.auto1 || carInputs.auto2 || carInputs.auto3 || carInputs.carPilot)
    2.             {
    3.                 PlayerController();
    4.             }
    this way the above code would run if you are the player car.

    let me know how it goes
     
  6. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,169
    your drifting throttle factor min and max seems to be a bit high, can you try using the settings from the demo levelload? which is at the InitialScene scene
     
  7. Freznosis

    Freznosis

    Joined:
    Jul 16, 2014
    Posts:
    214
    Code (CSharp):
    1. if (!carInputs.GetCarPilot())
    2.         {
    3.             carController();
    4.         }
    5.         else
    6.         {
    7.             if (carAI.NavigateTWaypoints.GoPits)
    8.                 if (carInputs.GetCarSpeed() > IRDSWPManager.GetPitMaxSpeed())
    9.                 {
    10.                     //No way to limit the car speed on RCC
    11.                 }
    12.             if (carInputs.auto1 || carInputs.auto2 || carInputs.auto3)
    13.                 PlayerController();
    14.             if (IRDSStatistics.GetCanRace())
    15.             {
    16.                 drivetrain.Active = true;
    17.             }
    18.             else
    19.             {
    20.                 drivetrain.Active = false;
    21.             }
    22.         }
    Is the auto1, auto2, and auto3 necessary in the first part of your script? Because in PlayerController() you are already checking if auto1, 2 and 3 are true. So could I remove the if statement and just call PlayerController() and be fine? Because they are stopping PlayerController() from being called and are already being checked in the PlayerController() block.

    Code (CSharp):
    1.        if (carInputs.auto1)
    2.             drivetrain.input.Vertical = -carInputs.GetBrakeInput();
    3.  
    4. if (carInputs.auto2)
    5.             drivetrain.input.Horizontal = carInputs.GetSteerInput();
    6.  
    7. if (carInputs.auto3)
    8.             drivetrain.input.Vertical = carInputs.GetThrottleInput();
    9.  
    10.  
     
  8. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,169
    Yes that makes sense
     
  9. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,169
    Hi guys! Just wanted to let you all know I'm still working on the physics, I haven't post here much info/progress so far on it, but wanted to let you know I'm working on it everyday, i would be posting some videos here soon so you can take a look as how it is getting so far.

    Currently I'm on solving the axle differentials (locked one first which all the other would pretty much derive from), while i have been doing this, i had to go back to the tire physics and change stuff that i though were already correct(on the new physics), so it have been a back and forth from there several times and thus why it is taking time.

    Just wanted to let you all know I'm on it, about an ETA, is hard to tell a time estimate, as this pretty much is something i have to dig into and research and a cycle that goes back and forth tons of times to get things right, once this part is done, pretty sure it wont take long to get it overall done.

    Cheers!
     
    mthawley and Zaddo67 like this.
  10. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    876
    your's welcome home :)
     
    rhodnius likes this.
  11. vyral13

    vyral13

    Joined:
    Sep 13, 2014
    Posts:
    6
    Yo!

    I have a quick question regarding the new physics / suspension your working on. Are the vehicle handling going to completely change with your new upgrades? Only reason i ask, is again your physics system currently once fine tuned is more simulation feeling and i love that. If you are removing all the old system please let me know as il upgrade to a copy of the current full source code as is.

    Anyway, I have spent 1 week working on a new project, using current IRDS physics :)

    Thanks!

     
    rhodnius likes this.
  12. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,169

    In short answer yes, the physics would change the current handling of the physics, the good thing is, is yet more oriented to simulation feeling as the new physics tries to be more realistic than the previous one, still you can set it up to be arcade style too with some parameters.

    Cheers
     
unityunity