Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    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. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    766
    Hi, maybe it was already mentioned in previous 20 pages but how to integrate Rewired with this asset? I found the script within the .rar file but no clue how to use it. Also the manual isn't mentioning anything about Rewired :(
     
  2. twiggyash

    twiggyash

    Joined:
    Nov 7, 2013
    Posts:
    45
    Hi, took it yesterday during sale and it seems amazing. I'm going to use it for a "Mario" kart game. One question.. are you going to support motorbike too?
    Thank you very much for your work!!! Keep going! ;)
     
  3. Paulo-Matias

    Paulo-Matias

    Joined:
    Jun 27, 2013
    Posts:
    31
    Hi, ive been searching and comparing unity vehicle phisics available in asset store and it seems irds is the one more capable to reproduce what i want to acomplish but still i have a question, how is the flexibility irds have to reproduce realistic/simulation phisics for track/rally/buggy racing, i watched the new suspenssion system video and the car mesh suspension arms dont move acording to the rig, does is possible to get it working like a real car? thanks in advance.
     
    Last edited: Nov 12, 2016
  4. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    Yes it works with EVP, we have demos mostly for circuit, but there are games already published that uses most of them that you could check, here is a link to one of the publishers:

    LINK

    1. Traffic AI is a separate plugin which is iTS, and our racing AI from iRDS would be able to take sharp turns for sure.
    2. Yes you can, as the physics is independent from the AI.


    Yes you can do networking with Photon and iRDS, there are some games that already does this.

    Sorry for the inconvenient, you just need to add the rewired script to the cars prefabs under the Resources folder and then select the input type to external, and setup your Rewired manager for the inputs ;) Would be making a tutorial about it soon to overcome this issue.

    I can definitely add support for it, should be pretty straight forward to do, if you want you could also take as example either of the actual scripts that are there for 3rd party physics and make it work with motorbike (this sounds like a third party plugin) but if you refer for iRDS own physics, it is already there, just use the Rig wizard and rig your 2 wheeled vehicle as you will do with a car and then tune the script for the bike to make it behave as you would like to.

    The new suspension would make the visual tire move as expected with the different types of suspension you could choose from, but wont move the actual arms of the suspension itself, i have seen before someone using Megafiers to accomplish this and worked pretty well, but i have no details on how he did it exactly.



    Let me know guys if you have any further questions, and sorry for the late reply, I was out last 2 weeks and was catching up with emails first and now with forums.

    Cheers!

    Rhod,
     
  5. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    This have been quite for a little while, i want to let you know I'm still working on updating iRDS and iTS, one thing I would be doing is code cleanup and performance tweaks before getting into adding more new features as usual, please if you guys think something can be added, let me know so we could include it into the To Do list for this next year.

    Cheers!

    Rhod,
     
  6. pinchmass

    pinchmass

    Joined:
    Jul 2, 2012
    Posts:
    156
    Hi (happy new year).......

    can you give me some help with the obstacle avoidance (I just want some road blocks for now (blocking half the road width) but would also like to use iTS. But I'm having no luke avoiding a cube.....

    I have set the cube with the tag "obstacle" and on a layer called "obstacle"

    I have also tried making it a child of a empty gameobject on a layer called "obstacle sensor".

    could you take me though the set up as I'm obviously lost.

    speak soon
     
  7. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334

    Hi pinchmass, sure! let me take a look and would get back to you.

    Cheers!

    Rhod,
     
  8. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    Also, I want to let you guys know I'm going to drop support for Unity 4 and Unity 5.0 (would be from Unity 5.1 and up), so the latest version it is on the asset store for unity 4 and Unity 5.0 would stay as it is currently and wont be updated anymore, this is to ease the maintenance of the plugin, as currently there is 6 projects (3 for dll version and 3 for source version) for Unity 4.6, Unity 5.0 and Unity 5.1, since Unity changed stuff that needs to be addressed separately.

    I'm pretty sure most of you are working on latest version of Unity, comments are welcome as always. This would definitely give me way more time to do what you want, and stop from copying stuff from one to the other and replicating everything which consumes time.

    Cheers!

    Rhod,
     
  9. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    Hi @pinchmass !

    You need to also attach to that object the script IRDSObstacle so it is recognized by the AI cars, in that script you have some options that when you see them for sure you would know what are they for. the tag must be set to obstacle.

    Let me know if this helps you out.

    Cheers!

    Rhod,
     
  10. pinchmass

    pinchmass

    Joined:
    Jul 2, 2012
    Posts:
    156
    Hi sorry still no joy (but must be me)

    so here is what I have

    1 cube (with a collider not set to isTrigger) and added the IRDSObstacle script (not used these components before) it has the option “is static” and “Hit Object” this cube is on a layer called “obstacle” and the tag “obstacle” all lower case. (seems logical to me)

    Also in the physics manager I have set the layers obstacle and obstaclesensor to only collide with each other and no other layers


    and on the car I have set the parent object only to the layer obstaclesensor



    I don’t get any error but the cars don’t attempt to avoid the cubes (and don’t collide with them just pass through them)



    I have noticed when I run the game the IRDSObstacle script on the cubes turns off (unticked)



    should I be adding the IRDSObstaclesensor script at some stage ?



    my understanding is this is added to the cars automatically when it detects objects with the tag “obstacle” (lowercase) in the game



    do the obstacle objects (cubes for now) new to be grouped under a parent object ?



    I’m obviously missing something as it makes sense just does not work ?
     
  11. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    Hi @pinchmass I'm checking it right now, to let you know exactly what you need to do.

    Cheers!

    Rhod,
     
  12. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    This is how you have to get your cars setup for obstacle avoidance:

    1. Add a cube to your cars as child of the main car GameObject.
    2. Make the collider of that cube to be a trigger and remove the mesh renderer component.
    3. Add the IRDSObstacleSensor script to this cube.
    4. Make the BoxCollider of the cube the size you want the sensor to be.
    5. Assign to the obstacle sensor field the BoxCollider of the cube that have the IRDSObstacleSensor script attched.
    6. Add to your obstacles the IRDSObstacle script and make its tag to be "obstacle"
    7. Place the obstacles on the track.
    8. Run the scene.

    Here is a pic of the car with the script and cube attached to it for the obstacle sensor:

    upload_2017-1-18_13-8-51.png

    Cheers!

    Rhod,
     
  13. pinchmass

    pinchmass

    Joined:
    Jul 2, 2012
    Posts:
    156
    Great got it working now, I can see a little line spotting the obstacles from the cars.

    Have you any tips for the AI settings that will exaggerate avoidance (Iv set the breaking more aggressive and the lockahead factor higher) but was just guessing really, its works fine for your physics system but I was using RCC and not getting as good avoidance.

    cheers again
     
    rhodnius likes this.
  14. Frommars

    Frommars

    Joined:
    Sep 10, 2013
    Posts:
    1
    Hi! I found that every car have "Top speed limit" option

    How can I change it from script? Is it possiple to limit top speed for all cars in race(inсlude players car)?
     
    Last edited: Feb 1, 2017
  15. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    You can make the Overtake Offset Increment to have a higher value, this would make the AI react faster, and also the Back to Line increment value.

    Yes you can add the top limit speed for all the cars in the race, including the player's car, since that is a value you set on the car physics side and not on the AI. You can access this from the class IRDSCarControllInput using the float topSpeedLimit to set the max speed and the bool isTopSpeedLimited for enabling it.

    Let me know if you guys have any further questions.

    Cheers!

    Rhod,
     
    Frommars likes this.
  16. Davidbillmanoy

    Davidbillmanoy

    Joined:
    Jul 7, 2014
    Posts:
    120
    Is your physics engine sim or arcade? Is your physics based on Alternate Physics from a Unity tutorial? Is your physics as accurate as rFactor and Unity Car?
     
    Last edited: Mar 3, 2017
  17. DiegoDePalacio

    DiegoDePalacio

    Unity Technologies

    Joined:
    Oct 28, 2009
    Posts:
    506
    Hi, I just bought iRDS and seems pretty nice!

    I want also to buy a Logitech Driving Force G29 Racing Wheel, Pedals and Logitech G Driving Force Shifter to use as the input controls for the player... Do you have a recommendation / predefined settings to use those devices with iRDS?, Or maybe there are another alternative of such kind of controllers which integrate better with iRDS?

    Thank you in advance for your help.
     
    rhodnius likes this.
  18. rhodnius

    rhodnius

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

    You can use Rewired for setting up your controllers too, so it should work just fine, I personally tested iRDS inputs (without Rewired) with the Logitech G27, have not tried out the G29 but should work pretty much the same, but still i think you can get a better result with the Rewired integration we made for the latest version of iRDS which is the one you have.

    Either way (iRDS internal Inputs) or Rewired, or even your own code should work just fine.

    Let me know how it goes.

    Cheers!

    Rhod,
     
  19. Memory-Noise

    Memory-Noise

    Joined:
    Jan 17, 2011
    Posts:
    16
    Hi Rhodnius,

    I'm having a few issues trying to generate a simple race line - I'm using a series of Empty GameObjects named Marker_1, Marker_2, Marker_3, etc inside a "Marker_Strip" GameObject which I use as Marker Container.

    I've added a IRDSManager, using both the AI System and the Level Settings; Once I press "Load Markers as Race Line" I only get the following Exception (way too long to post it here) : http://pastebin.com/9Y197Nmv, meanwhile I get a "Processing Track Data, Please Wait..." bar stuck in the middle of the screen.

    Any suggestion?
     
  20. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    Hi @Memory-Noise

    Thanks for your purchase,

    Please send me an email to josegarrido@dagagames.com to help you out ASAP.

    Thanks

    Rhod,
     
  21. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    Hi guys!

    I have been reported of a bug in Unity 5.6 with the dll version (have not yet tested the source version though) that makes unity be laggy, seems is a conflict between 2 classes, one is from iRDS and the other seems to be a new class implemented in unity, would be fixing this pretty soon, the main way i would address this is putting everything (classes) under the namespace iRDS, so if you have any custom scripts that are accesing any of the iRDS classes you would have to add the using iRDS; at the top of the script.

    Cheers!

    Rhod,
     
  22. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    Just tested the Pro version and seems to be working good.

    Just tested the Dll version and is working as well, not sure what could happen to the person that reported the issue, would be checking back with him, could be maybe that he is running it on Mac and the Mac might not be able to recompile de Dll's would let you know soon.

    Cheers,
     
    Last edited: Apr 5, 2017
  23. f1b0n4cc1

    f1b0n4cc1

    Joined:
    Aug 27, 2015
    Posts:
    38
    does mobile control function working ? i could not get it done, previous version , i was adding event system and touch controls to the mobile control manager that i made by irds , but now i cant do it. Any suggestion ?

    Errors:

    MissingFieldException: Field 'UnityEngine.EventSystems.EventTrigger.triggers' not found.
    IRDSPlayerControls.InitializeInputs ()
    IRDSPlayerControls.Start ()

    --------------------------------------------------------------------------

    Cannot add menu item 'GameObject/UI/iRDS/Mobile Controls/Mobile Control Manager' for method 'IRDSUIMobileControlsOptions.AddMobileControlManager' because a menu item with the same name already exists.
     
    Last edited: Apr 11, 2017
  24. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    Hi f1b0n4cc1!

    This is because you may have upgraded from a unity version lower than 5.1 and upgraded to a later version, you need to redownload iRDS on the new unity version and import it, since the UI had changed internally on Unity versions, iRDS have another version for 5.1 and greater Unity versions.

    Cheers!

    Rhod,
     
  25. f1b0n4cc1

    f1b0n4cc1

    Joined:
    Aug 27, 2015
    Posts:
    38
    i downloaded irds again and installed by choosing " all " while importing. still same. Unity versiyon 5.6.0.f3 , platform android
     
  26. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    Try deleting the iRDS folder and importing it again from the asset store, if you have rigged cars take them out before deleting the entire iRDS folder.

    Let me know how it goes.

    Cheers

    Rhod,
     
  27. f1b0n4cc1

    f1b0n4cc1

    Joined:
    Aug 27, 2015
    Posts:
    38
    indeed , i already deleted irds folder completely and imported latest irds from asset store , nothing changed. I tested demo mobile scene of irds , it gave same error, i add screenshot
     

    Attached Files:

    • irds.jpg
      irds.jpg
      File size:
      221.1 KB
      Views:
      885
  28. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    Is definitely importing the wrong version, you need to manually go to c:\users\youruser\AppData\LocalNow\Unity3D\Assetstore5X and go to Jose Garrido folder and delete the iRDS package there and redownload from within unity 5.6 asset store window and import it, for some reason unity is not downloading the correct version for you or importing the correct version for you, you need the iRDS for Unity5.1 and later version, which the asset store is supposed to provide automatically from within the unity version you are downloading the package, Unity bug seems to be to get the correct package for you :)

    Let me know how it goes

    Cheers

    Rhod
     
  29. f1b0n4cc1

    f1b0n4cc1

    Joined:
    Aug 27, 2015
    Posts:
    38
    i followed AppData\Roaming\Unity\Asset Store-5.x

    ( there is not asset store folder inside Local or LocalLow folders )

    location , deleted IRDS folder

    i downloaded IRDS from asset store again and installed , same result

    i added screenshots.

    Can you confirm that demoscenemobile work on your side ?
     

    Attached Files:

    • 1.png
      1.png
      File size:
      450.7 KB
      Views:
      870
    • 2.png
      2.png
      File size:
      190.7 KB
      Views:
      991
    • 3.png
      3.png
      File size:
      602.2 KB
      Views:
      828
  30. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    Yup confirmed it works just fine, the correct folder is C:\Users\[AccountName]\AppData\Roaming\Assetstore5x please go there and delete the package and download.

    Cheers

    Rhod
     
  31. f1b0n4cc1

    f1b0n4cc1

    Joined:
    Aug 27, 2015
    Posts:
    38
    indeed , i did exactly same , i even tried on unity 2017.1.0b1

    i made new project, imported irds , opened demo scene and same error.

    i confused , i do not know what can cause this . sorry to take your time with this issue. i will try to solve and write here the result
     

    Attached Files:

  32. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    Hi f1b0n4cc1!

    It seems that the wrong dll was attached to the unity 5.1 version by my mistake on the asset store! sorry about that, please contact me directly to josegarrido@dagagames.com to send you the correct ones right away, would be uploading soon that version with the correct dlls, sorry about that again. This is the biggest reason I'm going to stop updating iRDS for versions earlier than 5.1 of unity.

    Cheers!

    Rhod,
     
  33. f1b0n4cc1

    f1b0n4cc1

    Joined:
    Aug 27, 2015
    Posts:
    38
    thanks , i sent email
     
  34. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    Hi guys!

    I'm re-uploading the correct dlls for unity 5.1 and up, sorry for the inconvenience. is up now, but pending review from the asset store team.

    Cheers!

    Rhod,
     
    Last edited: Apr 14, 2017
  35. f1b0n4cc1

    f1b0n4cc1

    Joined:
    Aug 27, 2015
    Posts:
    38
    thanks , i can use irds now.

    Is there any problem with ITS ? is it working on unity 5.6.0f3 ? i added lane , i added GameReady3DModel car from irds package for ITS traffic system by following GameObject --> ITS --> Simple Vehicle ---> Add empty . ı rigged car by following tutorial.
    ( Note : i cant use car models from ITS folder , because when i select wheels , and click ok , i cant continue to next option , i stuck on wheel selecting screen and every time i hit okay , i see new wheels on hierarchy window , so i decided to use models from irds folder )

    I tried to use ITS car model but this is the error i get after selecting wheels and click okay :

    "
    NullReferenceException: Object reference not set to an instance of an object
    TSSimpleCarRigger.addAntirollbars () (at Assets/iTS/Traffic System/Scripts/Editor/TSSimpleCarRigger.cs:847)
    TSSimpleCarRigger.assignWheels () (at Assets/iTS/Traffic System/Scripts/Editor/TSSimpleCarRigger.cs:748)
    TSSimpleCarRigger.OnGUI () (at Assets/iTS/Traffic System/Scripts/Editor/TSSimpleCarRigger.cs:164)
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
    UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:262)
    UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:255)
    UnityEditor.HostView.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:84)
    "


    Strange part , when i hit play button , i cant see car body on game window and only see car driver model and skeleton of car model )

    and i get this error :
    "
    IndexOutOfRangeException: Array index is out of range.
    TSNavigation.OnDrawGizmosSelected ()
    UnityEditor.DockArea:OnGUI()"


    I wish there was an ITS forum topic as like IRDS here. Daga forum is not actively using by customers i think.

    Also , i wonder if it is possible to use pre-made models on ITS as similar to IRDS. As you know , we can add pre-made car on IRDS which is nice.

    Thanks for your answers
     

    Attached Files:

    Last edited: Apr 17, 2017
  36. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    Hi! there is an iTS forum here:

    https://forum.unity3d.com/threads/released-its-intelligent-traffic-system.284994/

    You can post your question there.

    I would check the car rigging wizard on iTS you can also just take one of the already rigged prefabs that are under Vehicles folder and replace the meshes with the car you want to use.

    The car body is could be despairing because the car mesh is set as a break light, check TSSimpleCar on the inspector for the brake lights array and make the array size to be 0, the other errors seems to be related to not using the Traffic spawner to spawn the cars, the system is meant to auto spawn the traffic cars for you.

    Let me know if you have any further questions.

    Rhod,
     
  37. Hi,
    I have a working racing game using EVP and a very basic AI that I hacked from the Unity Standard Assets.
    However, my basic AI is pretty bad :$

    So, I really like the look of your AI.
    I can see from your videos that it is going to be easy to program my *tracks* into iRDS.
    However, I can't see how easy it is to tell iRDS about my cars:
    Is there a lot of experimenting required to get the cars to drive around the track fast enough to be challenging, but no so fast that they spin off? Or is this quick and easy? Quick and easy is nice:)
    I saw also that your AI can handle drift: this is good! Again, I'd like to know if it is quick and easy to "plug my drift car" into iRDS and make it work on various tracks. For now, I'm just using the drift car that comes with EVP.

    Are there videos or a tutorial or something that explains how to do any of this? A video showing how to make the standard EVP drift car (or any "3rd-party" car, really) work with iRDS would be very useful. I'd anticipate adding more cars with different characteristics to my project in future, it is good to know if this is easy to "import".

    Finally, I'll be getting the "DLL" version of iRDS: if I needed to switch to "source", I assume this is easy?
     
  38. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    Hi RafiRomero!

    iRDS already have a folder with the needed scripts to integrate it with Edy's VP physics, and it is documented on the Readme file.

    About switching from Dll to source, you need to save your car settings and iRDSManager settings before updating and after updating (you need to delete the iRDS folder to do so and also you MUST fo a full project backup just in case anything that could rise) and the references of the scripts would appear to be missing, since the meta files from the Dll's are different from the source version, you need then to manually reassign the scripts or use a tool like the one that the guys that made Daikon Forge GUI which is at this-> link

    Let me know if you have any further questions.

    Cheers!

    Rhod,
     
  39. Hamad008

    Hamad008

    Joined:
    Apr 28, 2017
    Posts:
    1
    hello rhodnius, do you have an instant chat id?
     
  40. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    Just sent you an email ;)
     
  41. Hi,
    Thanks for your reply.

    Can you give me an idea of how long it would take to get the EVP "Sport Coupe" to race around the outer EVP "The City scene" track?
    Would it be just as easy to make the "Sport Coupe Drift" work?

    I need to know if I need to do a lot of experimenting to get the cars to drive sensibly, or if they will quickly "just work".
    With my own (poor) AI (based on the Unity Standard Assets examples), I had to spend a long time per track experimenting to get the cars to drive fast, but no so fast that they'd spin off the track.
     
  42. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    Hi RafiRomero,

    You always need to spent some time tweaking the AI values to get the result you are looking for, but shouldn't be that much time, system calculates by itself the maximum speeds the AI can take on the corners, and you can tweak that by using the AI settings.

    Let me know if you have any further questions.

    Cheers!

    Rhod,
     
  43. speedy19802

    speedy19802

    Joined:
    May 10, 2016
    Posts:
    53
    Hello! I buy irds source. a question . How can I turn through. The wheels when I press the handbrake. And there is a tuturial for intrgation of multiplayer?
     
  44. Hmtooo

    Hmtooo

    Joined:
    May 20, 2015
    Posts:
    11
  45. Hi,
    I've used the "complete scene" (mountainous race track) from your iRDS demo as a starting point.
    It's mostly working.
    I'm using my EVP cars, and they do reasonable racing without me having to change anything.

    However, I want to use my own camera, and disabling the iRDS camera from the demo scene causes endless exceptions. What do I need to do to tell iRDS that I don't need it to handle the camera? I really just want iRDS to drive the AI cars and provide race statistics.

    I also want to be able to drive my EVP car around the environment, and then press a button to start a race. I don't really want to (re)load the scene to do this.
    So what I want is an "empty" race that hasn't started yet. And then when I press my button, I want to add the EVP car that I am driving (not a new instance from a prefab), and add some AI cars (from prefabs is fine), and then have the race start. How do I do this?
     
  46. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    Hi @speedy19802 thanks for your purchase! you can send steering inputs using the IRDSCarControllerInput class on the player car and using the SetSteerInput(int) method.

    Hi @Hmtooo , you can check on our webpage www.dagagames.com for the android demo APK on the iRDS->Demos section

    Awesome!

    You need to use the Force Free Camera and Free Camera options on the IRDSCarCamera script to make it not do anything and you would need to also call the method StartTheRace() on IRDSStatistics

    For this one, not sure what exactly you are looking for, but it sounds like you want to do something like on the Old NFS where you can drive around and at some point start the race, you could try setting the levelload object to not have any AI cars and start the race, this would leave just the player car instantiated there, and then you could add the AI cars using the specified methods on IRDSPlaceCars class (AddNewAICar()) to add the AI and restart the race.

    The other way could be, to instantiate the player car by your own code, and when you want to start the race, add that instantiated player car using the IRDSPlaceCar.AddNewPlayerCar() and adding as well the AI cars in the same way as explained before and then restart the race using the restart method on IRDSStatistics class.

    Cheers.

    Rhod,
     
  47. It seems like both LevelLoad and the IRDSManager instances must be in the root of the heirarchy, rather than in a container (otherwise, I got exceptions).
    This is a little awkward for what I want, but I think I have it working now.

    I:
    Permanently disabled your Main_Camera\Camera, Main_Camera\GUILayer Main_Camera\FlareLayer, Main_Camera\AudioListener, and set IRDSCarCamera to both "Enable Free Camera" and "Force Free Camera", as you suggested (I think you're making a new version of iRDS: it would be great to just have a single "use my own camera" checkbox somewhere (or just detect that Main_Camera is missing and do without)! It was pretty confusing getting exceptions from inside the DLL when I disabled the Main_Camera).

    I also:
    Start with the IRDSManager *gameobject* enabled (so I can find it in my heirarchy), but the IRDSManager *component* of that gameobject disabled.
    Start with the IRDSWPManager child gameobject disabled.

    Then, when I hit my "Start Race" button, I enable the IRDSManager component and the IRDSWPManager gameobjects. The race will then start.

    I haven't had time to add my own car to the race yet, but at least I can drive alongside, and it feels like this will be easy to do this now.

    FYI I'm making an open-world driving/ exploration game that also has optional races. So, you can drive around the environment in your car, and then when you want to race, you trigger this somehow (at the moment, by pressing the race button).

    Thanks for your quick reply, the explanation about the camera let me get on and make stuff work today:)

    Regards,

    RafiRomero:)
     
  48. Hmm, all this fiddling about with pre-disabled objects is a bit messy and is causing an exception in your editor scripts (
    NullReferenceException: Object reference not set to an instance of an object IRDSManagerEditor.CheckMarkersPlaceHoldersByScript () IRDSManagerEditor.LoadResources () IRDSManagerEditor.OnEnable ())
    .
    However, I don't really want you to spawn cars until I'm ready.
    I can delete all of the AI cars via the LevelLoad thingy: is there some way to prevent the player car from spawning? As I've said, I've got my own set of cars that I control outside of iRDS, I don't want iRDS to spawn player cars at all.
     
  49. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    Yes you can set the levelload to spawn cars manually, and the system wont instantiate them at all, but for them to be able to drive you need to use the AddAICar method on the IRDSPlaceCars class, using the method that have as first parameter an instance of the IRDSCarControllerAI class, which you should get the reference from the AI cars you instantiated already.

    Cheers!

    Rhod,
     
  50. If I leave "IRDS Level Load Variables\Respawn / inatantiating settings\Instantiate Cars Manually" off, the game spawns the cars on startup (and I can then manually start the race).
    If I turn "Instantiate Cars Manually" on (and that's all I do), I get the following exception on startup:

    ArgumentException: The Object you want to instantiate is null.
    UnityEngine.Object.CheckNullArgument (System.Object arg, System.String message) (at C:/buildslave/unity/build/Runtime/Export/UnityEngineObject.cs:239)
    UnityEngine.Object.Instantiate (UnityEngine.Object original, Vector3 position, Quaternion rotation) (at C:/buildslave/unity/build/Runtime/Export/UnityEngineObject.cs:151)
    IRDSPlaceCars.Awake ()
    It looks like it is trying to use grid position 0 for a car that doesn't (yet) exists.

    I'd like it to just sit there, waiting for me to add the player and AI cars. Is this possible?