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

    speedy19802

    Joined:
    May 10, 2016
    Posts:
    47
    https://www.dropbox.com/s/orj7yytm8iqwxcg/1.png?dl=0Good day . Unfortunately, the problem with the kfriction was not fixed, I deleted the old version of IRDS, created a new scene, so Kfriction 0 is set to 3.402823e + 38 and Kfriction 1 is set to NaN. According to, ki drives off, she does not brake in curves, If you set Kfriction 0 and 1 to 1, ki drives a maximum of 70 km / h

    https://www.dropbox.com/s/orj7yytm8iqwxcg/1.png?dl=0

    https://www.dropbox.com/s/d93cih4mssal3li/2.png?dl=0

    https://www.dropbox.com/s/d7az2a6l7uhblmp/3.png?dl=0
     
  2. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,174

    I would be taking a look a your recommendations, also the Source version was updated, but the lite version is still pending approval, which is weird that the asset store team is taking so long to approve.
     
  3. speedy19802

    speedy19802

    Joined:
    May 10, 2016
    Posts:
    47
    Hello . I use the source version!!!
     
  4. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,174
    Cool then, you have the fix already :D
     
  5. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,174
    Oh you mean to the other issue, i have not yet done that one, will do today
     
  6. speedy19802

    speedy19802

    Joined:
    May 10, 2016
    Posts:
    47
    that would be great . thank you for your help
     
  7. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,174
    I see you are actually using Modyen, is that the case? if so please send me the script you modified to use it with Modyen as that could be the issue i think.

    Cheers
     
  8. speedy19802

    speedy19802

    Joined:
    May 10, 2016
    Posts:
    47
    Hello. yes, I use modyen. i have modified irds car controller edy.s. I will send you the script.
     
  9. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,174
    I have found the issue to the problem reported by @speedy19802, would be uploading the fix today.

    Cheers
     
  10. fredastaire

    fredastaire

    Joined:
    Sep 10, 2017
    Posts:
    53
    Hey @rhodnius how would I pass the final standings info to another scene? I want to take the top four cars and make them move to the main race and the remaining cars go to a last chance race but I can’t for the life of me figure it out.
     
  11. Zaddo

    Zaddo

    Joined:
    May 19, 2012
    Posts:
    18
    HI Rhodnius,

    I am using easyroads and want to load the road limits from easyroads into IRDS. From previous posts, I understand that since easyroads no longer exports the transforms for the road limits, this cannot be done automatically.

    I am writing a little editor utility to get the road waypoints from the easyroads API. Could you please let me know how these should be generated. Do I"

    1. Create transforms down centre line of road. Then the road width will set the road limits?
    2. Create transforms for left and right edges of road? If this option, how should they be generated?

    Do the transforms need the correct rotation?

    Thanks.
     
    Last edited: Jan 4, 2019
  12. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,174
    I would have to check this one, all the needed info is on IRDSStatistics and the cars IRDSCarControllerAI scripts, so you would likely need to get that info from iRDSStatistics when the race ends, and pass it to your own class that would contain that information for you, and use that then to get it on another scene for now.

    You would need number 1 to be done, as the system would use it from the road center and place everything else as you described. The transforms can be not rotated as far as i remember, since the processing of the waypoints would do it for you.

    Cheers!
     
  13. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,174
    About the car going at a top speed of 70kph, you need to set tireBrakeForce = 1 of IRDSCarControllerAI (carAI variable) on the awake method of the IRDSCarControllInpuEdy or the one you are using, since it is set to 0 by default and making that weird behavior.

    would have it fixed soon and uploaded to the store
     
  14. fredastaire

    fredastaire

    Joined:
    Sep 10, 2017
    Posts:
    53
    @rhodnius
    Before i start adding code I want to float this pass you. If I make all cars have an unique id that would make it easier to sort them or would that cause issues with the standings script?

    If I can my thoughts are as an example is to make new race modes enum heat1, heat2... than take final standings id [h1.1],[h1.2]... than move them to start in amain based off heat race results by using the unique ids.
     
    Last edited: Jan 4, 2019
  15. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,174

    That sounds like something the ChampionshipSystem does, did you have tried that one out? check that one first, and see if that is what you might look for
     
  16. Zaddo

    Zaddo

    Joined:
    May 19, 2012
    Posts:
    18
    Thanks for quick reply Rhodnius.

    I have uploaded my utility that will generate waypoints from an easyroads road system. This might save someone else a few hours writing code to do this themselves.

    https://bitbucket.org/Zaddo67/easyroadswaypoints
     
    Last edited: Jan 5, 2019
  17. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    401
    Hello,

    I'm looking at purchasing this asset but would like to know something. I am using Easy Roads 3D and creating the race path at runtime, this allows infinite number of tracks (effectively) but I would like to know if I can pass the ER3D points to your asset at runtime. I see the @Zaddo created some code, but a quick review shows that code is to be used at design time... so I thought I'd ask.
     
    Zaddo likes this.
  18. Zaddo

    Zaddo

    Joined:
    May 19, 2012
    Posts:
    18
    I would also like to load track data into IRDS at runtime. The ER3D API is available at runtime to extract and pass waypoint information to IRDS.

    If possible, it would be nice to add road data on the fly. For example, car approaches an intersection and a decision is made to turn right, the program could then load waypoints into IRDS for the right hand road.

    I know IRDS has the ability to load all subtracks in design mode. But that requires all paths to be built and loaded in design mode.
     
  19. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    401
    Only at design time? BOOOOO! Someone please tell me this is wrong.

    @Zaddo. In other news: I am working with the latest beta of ER3D and it has lanes, so traffic is so easy.
     
  20. Zaddo

    Zaddo

    Joined:
    May 19, 2012
    Posts:
    18
    Hi @JamesWjRose , I am new to IRDS. I don't know if it can load waypoints at runtime. This feature may exist, Rhodnius is very responsive, he will let us know soon.

    The lane feature on ER3D is great news :) That will be very useful. I hope it is supported in the API.
     
    JamesWjRose likes this.
  21. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    401
    Thanks for the clarification.

    As for Lanes yes they are available in the api
     
    Zaddo likes this.
  22. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,174
    Currently is not built in the runtime code, only on the Editor code, this is mainly because the processing of the waypoints is a bit CPU consuming, as it needs to calculate the maximum speeds on corners for the entire road you are creating/importing, i could work on something to make this a bit less CPU consuming or maybe data pre-made on your side by prefabs? ideas are welcome.

    About this one, we would need first to make it possible to add them at runtime, the risk here is, that if they are not in place when needed, this could cause headaches, as the AI always needs to have a path.


    Not implemented for runtime, could be not too much trouble to just pass the editor class/methods that does this processing into the runtime class that currently holds all the waypoints and subtracks data, but as said before, is a bit CPU intensive.

    Cheers!

    Rhod,
     
  23. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,174
    Thanks for the sharing!
     
  24. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    401
    Thanks for the info, and I get your point about the amount of data at runtime can be painful. The only idea I have atm is to be able to add the Easy Roads 3D data for each individual road, and then at runtime choose from that data, for each road needed. Since I don't know your data, obviously this may be a big deal or not possible. (I've been a software dev for 20+ years, so I know that a design has benefits and drawbacks) Thank you kindly for your time and I wish you the best for your asset
     
  25. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,174
    Yeah, but if you already have the road built into the scene, why not having the data also built already? or maybe I understood something wrong?
     
  26. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    401
    All Easy Road 3D street are indeed done at design time, it is at runtime when the race circuit is created. My code, using the ER3D API, starts from a randomly selected road, then it finds the end connection and randomly selects a road, repeat for an X number of iterations. So at runtime I have the race path. I do this to insure that the game is not set with a specific number and pattern of race paths, this way the game stays a bit fresh. But because of this I don't know the path until runtime.
     
  27. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,174

    Oh ok, but still this sounds like something doable with having the code to process the track data at runtime code and not just editor code, since you do all that path creation at scene load, you could also process the track data at that very moment, some stuff would need to be made to start manually, or having the IRDSPlaceCars disabled by default on the scene (to avoid it starting to spawn cars before the track is actually created) and then enabling it when the process track data is done pretty much.
     
  28. fredastaire

    fredastaire

    Joined:
    Sep 10, 2017
    Posts:
    53
    @rhodnius

    Is there a way to call ai cars for gridPosNumber like for the player I’m trying to set grid positions from my script I created for qualifying but I can only set the players position from it.
     
  29. mthawley

    mthawley

    Joined:
    Sep 7, 2018
    Posts:
    60
    Hi. I purchased IRDS earlier today and am following the car rigging instructions. When I add the car prefab I see the message "Destroying a GameObject inside a Prefab instance is not allowed." When I try to select the tyres I get the message "Please select the tires from the model on the scene view only." I am using Unity 2018.3.2f1 Personal. Can you please advise? Cheers!
    irds2.png irds1.png
     
  30. vincespeed

    vincespeed

    Joined:
    Mar 8, 2014
    Posts:
    57
    Hello guys.
    I'm trying to solve a little issue I encountered while optimizing racing line brake point.
    So on my track I edited some waypoints' hill radius in order for the car to brake 50-100 meters before it used to previously. To achieve that, I setted low hill radius on those waipoints. And it worked flawlessly.
    I now boosted up car's braking capability, this means I need shorter brake distances. So, to achieve that, I have setted the hill radius of those waipoints back to a large number (the deafult one). The "in Editor racing line" correctly displays the line green instead of read. But when i run the game, cars will keep braking on those points as if nothing has changed.
    I dug the code to see what's going on, and noticed that IRDSWPManager has 2 relevant arrays:
    HillRadius1 (for each waypoint, it stores the real speed value the car can achieve, it is like internal calculated)
    HillRadius*something*(for each waypoint, it stores the "Hill radius" float set in "IRDSSpeedLimit";
    While I can edit the HillRadius1 values, this only seems to affect the 3D racing line appearing in game.
    My question is: is it any chance to set a higher speed limits, on those waypoints where before I set a lower one?
     
  31. mthawley

    mthawley

    Joined:
    Sep 7, 2018
    Posts:
    60
    Hi. I have tried rigging the car again but in 2018.2.18. It works! Cheers.
     
    rhodnius likes this.
  32. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,174
    You could if you use the specific AI drivers, so you can create their profile before using them, and in there you should be able to assign the grid position number, another way is managing the instantiation on your own script and using the method RegistarCar(with the parameters IRDSCarControllerAI InstanceOfThisScript) to add them to the IRDSManager once you have them instantiated, this way you control the positions you instance all the cars.

    Awesome, so this is solved then?

    You need to reset the hill radius of those points which is float.MaxValue for them to be processed and calculated automatically when you hit the button process track data.
     
  33. vincespeed

    vincespeed

    Joined:
    Mar 8, 2014
    Posts:
    57
    If I reset the hill radius value in the IRDSSpeedLimit field, and therefore process the track, nothing will change.
    Do you mean there's a public variable named "MaxValue" stored and accessible either in "IRDSSpeedLimit" or "IRDSWPManager"?
    BTW just noticed a typo in my previous post... the name of the Array storing maxSpeed is "Radius1" in IRDSWPManager, while "HillRadius1" is the array taken from the "HillRadius" value set in IRDSSpeedLimit;
     
  34. fredastaire

    fredastaire

    Joined:
    Sep 10, 2017
    Posts:
    53
    I don’t quite understand could you clarify just a bit. I tried using the spawned method of cloning the prefab and the cars just sat at the waypoints.
     
  35. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,174
    Hmm weird, if you see the racing line change colors, that is exactly what the AI cars uses to brake, would have to take a look at what you actually have there in the inspector, can you attach a picture pls of how you are resetting it.

    If you use the specific AI driver settings in Levelload object (IRDSLevelloadVariables script) you should be able to assign there the specific grid position you want each AI to be spawned at, in case you want the system to do the spawning, if you do the spawning manually, you need to set the manual instantiate cars option to on, on the level load object and instantiate the cars, and use the method IRDSPlaceCars.Instance.RegisterPlayerCar and IRDSPlaceCars.Instance.RegisterAICar passing to it the instance of the class IRDSCarControllerAI for the car you are adding.

    also you need to start the race manually, using IRDSStatistics.Instance.StartTheRace();

    That should do it :)
     
  36. ZGoodwin

    ZGoodwin

    Joined:
    Jul 14, 2017
    Posts:
    29
    Where can I find tutorials for integrating Realistic Car Controller, or, Edy's Vehicle Physics? There are no videos anywhere for this. The tutorial self-help .pdf has nothing involving this. On the asset store description, it is advertised as easy integration with these assets. I have spent a week trying to add car prefabs, with both existing and new iRDS setups. There are so many bugs.

    1) Bug one: The car prefabs from Realistic Car Controller, or, Edy's Vehicle Physics fall straight through the garage floor.
    2) Bug two: The car prefabs from Realistic Car Controller, or, Edy's Vehicle Physics shoot straight into the air, twirling around into space when the demo track scene is loaded.
    3) Bug three: When the demo track scene starts the game will count down 3,2,1 then nothing happens. The main camera is not attached to the selected car from the garage.
    4) Bug Four: When adding a car prefab from RCC, or, EVP all of the original scripts from the original RCC and EVP prefab get erased. The iRDS scripts are added. How can you have integration when all the scripts get erased?

    Any type of different approach to the setup procedure only results in a mixture of these four bugs.
     
    Last edited: Jan 28, 2019
  37. ZGoodwin

    ZGoodwin

    Joined:
    Jul 14, 2017
    Posts:
    29
    I'm looking for a Rally race "ranking and time" track structure. Do you know of options to accomplish this with iRDS? Currently, there are 5 different race types provided. So. the player is racing against AI that comes before and after the player depending on ranking.
     
  38. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,174
    Hi @ZGoodwin ,

    Sorry for the inconvenience, the garage scene is not meant to be used with third party physics, as the scripts are made for iRDS physics, you need to change it a bit to make it work, the problem you are seeing about the cars going through the floor and flying away might be caused because iRDS is a complete system package and all assets under this category includes all project settings (is not something we can avoid, it is like that because Unity includes them for this category) so you need to import iRDS without importing the project settings which usually are at the top of the import package list where you hit the import button, the best way to test your newly rigged cars is using any of the track scenes and including there a LevelLoad object and setting it up to load your new cars.

    Make sure no cars are on the scenes, all the cars are automatically instantiated by the system.

    You could use the sprint type of race, which is a point a to point b kind of race, then you could use the total time when the OnEndRaceEnd event is triggered to pull that time from the IRDSCarControllerAI instance.

    About the rigging process for 3rd party physics, it is supposed to be really straight forward, where you just select the car with all the 3rd party scripts attached to it and setup correctly and hit the add AI scripts option for the 3rd party physics from the iRDS menu and all it does is add the needed AI scripts, then you just need to add the reference of the 2 front wheels into the script that holds the reference to the main controller script of the 3rd party physics which is normally called like IRDSCarControllInputEdys or IRDSCarControllInputRCC and so on depending on the 3rd party used, after that, you would see that a new prefab is added to IRDS/Resources/Cars/ folder with the new car you just added, so actually is not really a rigging process, but more like adding the needed scripts to the already rigged 3rd party physics car.

    Do let me know if you need anything else.
     
  39. Zaddo

    Zaddo

    Joined:
    May 19, 2012
    Posts:
    18
    I am only using IRDS for steering and braking. I am not using any of the race framework.

    I have a problem getting steering to work. My vehicle can start in a random position

    The problem is the variable offTrackOffsetX in IRDSCarControllerAI is initially calculated in the IRDSCarControllerAI.Start() method and calculates the distance from the current vehicle position back to waypoint zero.

    This is because navigateTWaypoint.currentWaypointS is zero. IRDSNavigateTWaypoint has not yet had a chance to set the closest waypoints to the vehicle position.

    I could hack a solution. But I would prefer to work within the IRDS framework.

    Could you please let me know what the best way to either reset offTrackOffsetX or make it calculate correctly at start.

    My Current solution is to add the following line at the end of the IRDSNavigateTWaypoints.Start() Method

    carControllerAI.RespawnAtWaypoint(currentWaypoint, false, true);
     
    Last edited: Jan 30, 2019
  40. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,174

    Hmm then this sounds like a bug, it is supposed to get first the closer waypoint and then do this calculations, would look into it to make a fix.

    Thanks for the feedback.
     
  41. Zaddo

    Zaddo

    Joined:
    May 19, 2012
    Posts:
    18
    Hi Rhod,

    Don't spend too much time on it. It may not be a bug. Because I am not setting up the entire IRDS environment, the system may not be going through it's normal startup.

    I thought there may be a flag I am not setting to have IRDS do things in the correct order. Or something else I could trigger to reset position from one of my scripts.

    Thanks.
     
  42. speedy19802

    speedy19802

    Joined:
    May 10, 2016
    Posts:
    47
    Hello . I have a question . How can I change the color of the recing line. I would like to change from white to green.
     
  43. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,174
    I think is a matter of changing the actual texture color maybe? try that out and let me know
     
  44. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,174
    Oh ok got what you say, but still would be good to have things working that way too, so you are basically stripping some stuff out? would be good to know how you have your setup done and what you are trying to achieve, from your previous post i see you want to only use braking and steering and nothing else, so i assume you are talking about having that for the player, which i think is something you can already do having the auto brake and auto steering setup on the system, the problem i see you might be having is when you instantiate the player car on your own right? maybe you could use the RegisterPlayerCar on IRDSPlaceCars to add the player to the system and let the system handle it from there for you? if you want to start the race manually you can also do it by usin StartTheRace on IRDSStatistics when you want to do so.

    Let me know if this might help a bit.

    Cheers!
     
  45. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,174
    Hi guys, i just found an issue with the rigging car system which is caused by the new prefab workflow introduced on Unity 2018, would be uploading the fix soon.

    Cheers
     
    mthawley and hopeful like this.
  46. TG-Studio

    TG-Studio

    Joined:
    Oct 2, 2015
    Posts:
    4
  47. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,174
    Let me check it out, weird it is not braking at all, what options are you using? is that the player car set as AI Demo Car? or is it using the Auto brake, Steering and Throttle feature?
     
  48. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,174
    Yesterday I uploaded the new version to the asset store, it is still pending for approval, just to let you know about it.
     
  49. TG-Studio

    TG-Studio

    Joined:
    Oct 2, 2015
    Posts:
    4
    It's not player car, it's ai.
    I'm using the basic E36 prefab from RCC, i just pressed "add AI controller scripts to selected car" through IRDS menu:
    https://www.dropbox.com/s/ffalqf2szb7j9ic/Скриншот 2019-02-14 18.16.35.png?dl=0

    Then i tried to adjust ai settings: https://www.dropbox.com/s/jk59knyq9t3lgu3/Скриншот 2019-02-14 18.21.03.png?dl=0

    I'm also getting this error when i starting game:
    https://www.dropbox.com/s/3ai7b7ah0bm3ypc/Скриншот 2019-02-14 18.27.28.png?dl=0
     
  50. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,174
    Ok i see, but it should be spawning the player car, so not sure how you are getting there just a single AI car, are you using all the system like on the demo scene? or you are spawning the cars on your own and then registering with the system? would need a bit more detail on how you are setting up things to know what could be the issue, you could try using the new prefab you added AI scripts from RCC on the included demo scenes and see if it behaves the same way to discard is something on the setup on the scene you have.

    Also if you have still issues, we could do a remote session to help you out faster, just let me know

    Cheers
     
unityunity