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

[DEPRECATED] UnityCar 2.2 Pro. The most complete and accurate vehicle sim on Unity3D

Discussion in 'Assets and Asset Store' started by newlife, May 23, 2011.

Thread Status:
Not open for further replies.
  1. fabio1955

    fabio1955

    Joined:
    Nov 11, 2009
    Posts:
    72
    Last edited: Mar 17, 2015
  2. carking1996

    carking1996

    Joined:
    Jun 15, 2010
    Posts:
    2,608
    Don't use meshcombineutility. Those are old and they have newer things for that, specially since 5 has all pro features.
     
  3. newlife

    newlife

    Joined:
    Jan 20, 2010
    Posts:
    1,064
    As carking suggested, you dont need that script to use UnityCar. It was used in some old Unity version. Just delete it.
     
  4. Sondre-S

    Sondre-S

    Joined:
    Jun 29, 2013
    Posts:
    54
    Has anyone had any problems with the starter engine not working, when making a car with low torque and high max torque rpm? With a setup like this:

    1999 Honda Civic SI
    --------------------------------------------------------
    Max power: 160 bhp @ 8000 rpm
    Max Torque: 150 Nm @7000 rpm.

    engineInertia=0.35
    engineFrictionFactor=0.25



    With this setup the starter engine does not get enough torque apparently, and the engine wont start after a stall....

    btw, @ Michele, the HP Is break horse power right? And not Wheel Horse Power?
     
    Last edited: Mar 18, 2015
  5. 1982

    1982

    Joined:
    Sep 30, 2012
    Posts:
    7
    I have very odd issue, it seemed to came with Unity 5 update.

    It is like the tires have very high level of inertia/torque. See, if the car leaves the ground and while in air I switch to neutral or press clutch, tires still have the full rotational force. When car comes down and tires touch ground they don't lose any force (even I am in neutral or clutch is down) until after some time. Even tires that are not driving wheels, are acting like driving wheels. They are spinning against the surface! If I apply any brake it will neutralize the force.

    It feels like the tires weight many hundreds of kilograms and are having immense rotational torque.
     
  6. Mishaps

    Mishaps

    Joined:
    Nov 28, 2011
    Posts:
    181
    newlife - any issues moving projects with UnityCar 2.2 to unity 5?
     
  7. Mishaps

    Mishaps

    Joined:
    Nov 28, 2011
    Posts:
    181
    or tips at least? does the new physics stuff affect it at?
     
  8. carking1996

    carking1996

    Joined:
    Jun 15, 2010
    Posts:
    2,608
    It works fine.
     
  9. newlife

    newlife

    Joined:
    Jan 20, 2010
    Posts:
    1,064
    Hello, try to reduce engineInertia. The starter torque calculation doesnt take into account inertia, so if inertia is too high starter torque is not enough to start the engine. Max power is power to the driveshaft, not power to the wheels.
    Power to the wheels is max power minus engine friction.
     
  10. newlife

    newlife

    Joined:
    Jan 20, 2010
    Posts:
    1,064
    Hello, UnityCar 2.2 works with Unity 5. You just need to remove some legacy scripts used by an old demo.
    The new Physix 3.3 doesnt seem to affect UnityCar simulation, apart for improved general performance.
     
  11. Mishaps

    Mishaps

    Joined:
    Nov 28, 2011
    Posts:
    181
    awesome! Thanks newlife!
     
  12. fabio1955

    fabio1955

    Joined:
    Nov 11, 2009
    Posts:
    72
    I have some trouble with the truck example. In any demo scene it loses the trailer...
     
    carking1996 likes this.
  13. fabio1955

    fabio1955

    Joined:
    Nov 11, 2009
    Posts:
    72
    Ok it will be enough to double the break force and the break torque in the join of the prefab (SC Truck)
     
    carking1996 likes this.
  14. newlife

    newlife

    Joined:
    Jan 20, 2010
    Posts:
    1,064
    Hello guys,
    Im pleased to tell you that i finally succeeded in recovering the wiki (I fixed the error in the DB and i used the backup kindly made available by edcc). More, I also fixed some inaccuracies in the text.
    Now everything works and is up to date:

     
    Last edited: Apr 8, 2015
    JuhaFH and Sondre-S like this.
  15. Sondre-S

    Sondre-S

    Joined:
    Jun 29, 2013
    Posts:
    54
    Awesome! :)
     
    Last edited: Aug 18, 2015
  16. 1982

    1982

    Joined:
    Sep 30, 2012
    Posts:
    7
    There is issue with Unity5. The vehicle sounds are not being played as 3D sounds but 2D. How can I adjust how Unitycar handles the sounds?
     
  17. carking1996

    carking1996

    Joined:
    Jun 15, 2010
    Posts:
    2,608
    Make the sounds 3D in the soundclip's settings in Unity.
     
  18. 1982

    1982

    Joined:
    Sep 30, 2012
    Posts:
    7
    Of course they are 3d. See, this audio source is generated at runtime by Unitycar. It shows it is 2d instead of 3d. I would need a way to change it so that it is 3d by default.
     
  19. newlife

    newlife

    Joined:
    Jan 20, 2010
    Posts:
    1,064
    Hello,
    this is due to the fact that Unity5 handles 3D sound in a different way respect of Unity4. Please contact me with your invoice number or paypal email in order to receive the updated script.
     
  20. prasanth-akon

    prasanth-akon

    Joined:
    May 30, 2013
    Posts:
    16
    Does unity car MobileCarController supports MultiTouch? Because when i press accelerate(Unity car script) and Steering Script(Own Script), occasionally results in lose of control. Any idea how to fix this?
     
  21. fabio1955

    fabio1955

    Joined:
    Nov 11, 2009
    Posts:
    72
    In the CarSetUp is possible to specify one of specific physic materials (Grass, Sand...). Among the other parameters there is "isDirty". What does it mean?
     
  22. newlife

    newlife

    Joined:
    Jan 20, 2010
    Posts:
    1,064
    This is due to issues with the touch screen. You can experience this issue with any other app. Usually, rotating the device should help.
     
  23. newlife

    newlife

    Joined:
    Jan 20, 2010
    Posts:
    1,064
    No its not yet possible. isDirty means that the grip change of the physic material remains even after the tire is not on that physic material anymore (useful to simulate oil slick).
     
  24. Jason-Nash

    Jason-Nash

    Joined:
    Apr 30, 2014
    Posts:
    20
    Hello, could you please tell me how to activate the 3D tire feature. I've sent you an email (unitycar@unitypackages.net) but still haven't recieved an answer yet.
     
  25. Jason-Nash

    Jason-Nash

    Joined:
    Apr 30, 2014
    Posts:
    20
    I've received an answer to my question. The issue is 100% solved.
    Thanks for great support!
     
  26. gibmation

    gibmation

    Joined:
    Dec 1, 2014
    Posts:
    311
    Hi I am using unity 5 with Unitycar Pro2.1 and RTPV3 to cut holes in my terrain.

    With RTP a blank collider is placed on entrance of hole cut into mesh to act as trigger.
    RTP brings a script ResolveHoleCollision.cs that should be placed on the object that should be allowed thru' the hole.

    I have tried adding this to the F360 car collider inside prefab but will not work.
    I also tried making new collider on F360 parent object and added ResolveHoleCollision.cs script to this but still does not work.

    Any ideas where ResolveHoleCollision.cs script shoul dbe correctly placed?

    Thanks in advance.
    Gus
     
  27. WalterEspinar

    WalterEspinar

    Joined:
    Aug 23, 2011
    Posts:
    83
    Hello Jason, can share the answer?
     
  28. Sondre-S

    Sondre-S

    Joined:
    Jun 29, 2013
    Posts:
    54
    When I increase the engine power, and the torque at runtime, the car doesnt shift up on shift up rpm, seems like it waits until it reaches the end of each gear and it takes forever before it shifts up...
    Has anyone ever experienced this?

    When I change the performance in Start(), it's working fine, when I change it in Update(), automatic upshift takes too long and if I don't have revlimiter on, the rpm can exeed max rpm and then increases to insanely high numbers...
     
    Last edited: Jun 19, 2015
  29. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    In the demo of the asset, when a car goes fast and you change to the reverse gear (while the car going forward fast), they car spins and rotates (exactly same scenario occurs in many low quality car games and even some good car games like TestDrive Unlimited 2), This should not be happen, how to fix and force player to stop the car and then change the gear to the reverse or the car will crash.
     
    Last edited: Jun 20, 2015
  30. funselektor

    funselektor

    Joined:
    Oct 11, 2013
    Posts:
    105
    I've been having this problem too. There must be a bug with the rev-limiter because my RPM would go to infinity..

    Here's a hacky solution:

    Code (CSharp):
    1.  
    2. //(Drivetrain.cs)
    3. //(Insert this after the line with: "rpm = engineAngularVelo * angularVelo2RPM;")
    4.  
    5. if (rpm > 8300)
    6.       engineAngularVelo = maxRPM * RPM2angularVelo;
     
    Sondre-S likes this.
  31. Sondre-S

    Sondre-S

    Joined:
    Jun 29, 2013
    Posts:
    54
    Good to hear it's not just me:) Sent an email to NewLife too.

    It seems that it's not just the rpm, the gears feel weird too, like its only using the first gear ratio even if you shift up...

    Edit: Just found out, if you instantiate a car, it will have this behavior even if you do the performance tuning in the start function... :(

    What we need is to do the same as the SettingsMenu.cs...
     
    Last edited: Nov 27, 2017
  32. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    When I made a monster truck to hit another car by it's giant wheels (which both have UnityCar essential scripts) the wheels of the monster truck actually let the other car go though it, I added Colliders to the wheel of the monster truck but it didn't worked out, what should I do?

    Not only this but even if car crashes and gets some deformation, the wheels won't get stuck and continue rotating even if the deformation around the front bumpers and front arch (or rear bumpers and rear arch) was severe.

    Another question is that how should I use more crash sounds for the car, I mean "Low Crash" and "High Crash" sounds are okay for the body of the car, but cars have glasses, rubbers and plastic parts, I want those parts have individual crash sound, what should I do for them?

    Thanks in advance for helping.
     
    Last edited: Jun 22, 2015
  33. Sondre-S

    Sondre-S

    Joined:
    Jun 29, 2013
    Posts:
    54
    If I change horsepower runtime and then open the settings menu and change something it works, so it's something in the settingsmenu that I need to call, but I cant figure out what it is...
     
    Last edited: Jun 29, 2015
  34. gibmation

    gibmation

    Joined:
    Dec 1, 2014
    Posts:
    311
    Is this product still being supported?
     
  35. Sondre-S

    Sondre-S

    Joined:
    Jun 29, 2013
    Posts:
    54
    I finally found the problem! To modify the performance runtime, you need to call these functions:

    Code (CSharp):
    1. Drivetrain Drivetrain = GetComponent<Drivetrain>();
    2.        Drivetrain.CalcIdleThrottle();
    3.        Drivetrain.CalcClutchTorque();
    4.       Drivetrain.CalcValues(1,Drivetrain.engineTorqueFromFile);
     
    Last edited: Jun 30, 2015
  36. Davidbillmanoy

    Davidbillmanoy

    Joined:
    Jul 7, 2014
    Posts:
    120
    Does Unitycar have Power, Torque, and Turbocharger Simulation?
     
  37. JuhaFH

    JuhaFH

    Joined:
    Oct 24, 2013
    Posts:
    9
    Only Power and Torque, no Turbo.
     
  38. MrGky93

    MrGky93

    Joined:
    Feb 27, 2014
    Posts:
    281
    why there is no version 2.2 in the asset store ??
     
  39. Sondre-S

    Sondre-S

    Joined:
    Jun 29, 2013
    Posts:
    54
    Thanks for the improvement, but you totally missed the point. It was not meant to be a complete, woking code I was simply pointing out what functions you need to call.
     
  40. MrGky93

    MrGky93

    Joined:
    Feb 27, 2014
    Posts:
    281
    a way to put down the trailer ??
    Or put on it on the truck??
     
  41. newlife

    newlife

    Joined:
    Jan 20, 2010
    Posts:
    1,064
    Hello Sondre,
    sorry for the late. If you want to quickly change the power and torque of the engine, you can use the variable powerMultiplier (which is public but hidden in the inspector) in drivetrain class. In this way, if you want to double the power of the engine, you just need to set powerMultiplier=2.
     
  42. newlife

    newlife

    Joined:
    Jan 20, 2010
    Posts:
    1,064
    What do you mean with put down?
     
  43. Sondre-S

    Sondre-S

    Joined:
    Jun 29, 2013
    Posts:
    54
    Hi, thanks for the relpy, no need to apologize :)) The power multiplier is nice, but is it ok to set the power and torque the way I did? I found it pretty convenient, but maybe it could cause problems? (I made sure to only call CalcIdleThrottle and CalcClutchTorque once)
     
  44. newlife

    newlife

    Joined:
    Jan 20, 2010
    Posts:
    1,064
    If you are using the internal function to calc the engine torque, you have to choose those numbers (torque, power, max torque rpm, max power rpm) carefully (that is they must be congruent with each others), otherwise the the results will be weird (for example power will grow indefinitely instead of decreasing till zero).
     
    Sondre-S likes this.
  45. MrGky93

    MrGky93

    Joined:
    Feb 27, 2014
    Posts:
    281
    i mean click a button and the trailer is not connect to the truck ??
     
  46. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    Hello. I just stuck in the monster truck physics. I did my best to make the monster truck crush the other car (which in this case was exactly the duplicated car but with standard size of wheel), Please tell me how can I achieve that.

    ALSO one more thing that has been driven me too crazy, Whenever I use mesh collider for a Unitycar, car bounces and jumps but when I use box collide, everything would be fine, I need mesh collider because it seems that the monster truck won't destroy an other unitycar with box collider applied.

     
    Last edited: Jul 18, 2015
  47. newlife

    newlife

    Joined:
    Jan 20, 2010
    Posts:
    1,064
    Hello, you need to manually remove the joint between the truck and the trailer (or set the brake torque to a very small value grater than zero).
     
  48. newlife

    newlife

    Joined:
    Jan 20, 2010
    Posts:
    1,064
    This is not straightforward cause UnityCar uses spherecast to simulate 3D tire and spherecast doesn't simulate rigidbody contacts. Damage calculation is triggered only by rigidbody contacts.
    Some months ago I made some tests with rigidbody wheels connected with joints and results were very promising.
    With this kind of setup cars will be crushed automatically.

    This is not really clear. Please contact me via email or skype to better discuss this.
     
    imDanOush likes this.
  49. siblingrivalry

    siblingrivalry

    Joined:
    Nov 25, 2014
    Posts:
    384
    Hi, just a comment about the demo. The lorry moves like it is in treacle. Said it was going 80km but was going walking speed.

    Love the pack :) great work.
     
  50. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    I will try that way, thanks for the info.
    Okay. I'll contact with you as soon as possible. But before that, please let me express the problem and clarify it here as I assume most people struggle with it.

    When you use a box collider in a unitycar object there would be no problem, but when you use a mesh collider , game runs everything looks good but the car jumps and bounces.

    Please have a look at this video in which it expresses the problem, I need a way to solve the problem:


    I would be glad if you reply and say whether I clarified it for you or should I contact you?
     
    Last edited: Jul 19, 2015
Thread Status:
Not open for further replies.