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

UnityCar 1.0 Released. The most complete and accurate vehicle simulation on Unity3D

Discussion in 'Made With Unity' started by newlife, May 23, 2011.

  1. newlife

    newlife

    Joined:
    Jan 20, 2010
    Posts:
    1,064
    UnityCar 1.0 Released

    UnityCar is a realistic and complete vehicle simulation package for Unity3D Game Engine. With UnityCar you can easly integrate (without scripting) any kind of vehicle in your game, from a simple city car to a powerful Formula 1, from an offroad to an heavy truck.
    You can obtain any level of simulation accuracy, from an arcade behavior to a almost hardcore simulation.
    Adding a vehicle to your projects is as easy as clicking on a menu voice under Component/Physics menu.

    My package is going to be sold on the Asset Store at 97€. If you are a previous customer the price is 37€.
    While my package is being accepted in the Asset Store, you can buy it via PayPal. Contact me in PM or at info at migliortestesso.com



    In these demos you can test UnityCar with 5 different vehicles (you can select them with PageDown and PageUp keys):

    • Peugeot 205 T16 (a light and fast citycar);
    • Renault Clio Sport (another citycar, a little bigger than the previous);
    • Catamount (a powerful sport car);
    • Gmc Sierra Grande (an offroad car);
    • Monster Truck (an offroad car with very big wheel, perfect to test the Tridimensional Tire feature of UnityCar).

    Features:
    • Very easy to setup just click on "UnityCar" menu voice under Component/Physics menu and you are ready to drive;
    • Realistic tire model based on Pacejka formulas with the addition of longitudinal and lateral relaxation (cause the "shaking" effect of the car after a hard handbreaking, like in the end of this video;
    • Realistic car damages with repair option (based based on the work of BTM)
    • Realistic suspension model with spring, damper (dump and rebound) and anti-roll bar;
    • Optimized code suitable for mobile system like iphone or ipad;
    • Compatible with analogic input like driving wheels and pedals;
    • No lateral sliding on a slope;
    • 3D Tire all the contact points of the tire are found, not just only one vertical, like with the wheelCollider. Can be swithed off for arcade use;
    • Driving Aids useful to obtain an arcade feel (Anti Lock Brackes, Traction Control, Electronic Stability System, steering Assistance, Enanched Grip);
    • Complete DriveTrain modelled with fully functional clutch, differential, engine inertia, transmission (RWD, FWD, AWD), gears;
    • Complete Sound Controller with engine noises, trasmission noise, wind noise, crash noises, skid noise, scrape noise;
    • Customizable Dashboard with TachoMeter, RPMCounter, gear number, ABS, TCS and ESP lights;
    • Brake Lights;
    • Customizable in every aspect of the vehicle:
      • engine power and torque,
      • wheel grip,
      • terrain grip,
      • suspension spring and dampers (dump and rebound),
      • anti-roll bar forces,
      • aerodynamic forces,
      • weight repartition,
      • gears number and ratio,
      • etc
    • 6 fully functional vehicle prefabs included:
      • 1 Off Road car,
      • 2 City cars,
      • 1 Sport Car,
      • 1 Monster Truck car,
      • 1 Empty Car (fully functional car, you just need to place your graphics).
    • Extensive online documentation.

    Plus you get also: 5 fully functional dashboard with graphics, 4 different tyre models and 2 terrains (a city terrain and a track terrain (taken from Unity Car Tutorial)).
     
    Last edited: Jun 6, 2011
  2. azeitler

    azeitler

    Joined:
    May 14, 2008
    Posts:
    162
    Is this an extension of the Car Physics package that is already on the Asset Store ("EdyVehiclePhysics" or sth.)?

    Btw. I would be interested in a Truck/Heavy Machinery setup.
     
  3. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Pretty sure its not an extension.
     
  4. newlife

    newlife

    Joined:
    Jan 20, 2010
    Posts:
    1,064
    Hi azeitler,
    hippocoder is right. Thers no relation between my package and Edy's one. Its a completely different package.
     
  5. darrelljr00

    darrelljr00

    Joined:
    Aug 16, 2010
    Posts:
    59
    i sent a pm.. please check.. thanks\...
     
  6. IonDave

    IonDave

    Joined:
    Sep 27, 2010
    Posts:
    58
    I'm sold. Wow, nice handling.
     
  7. Tyler Ridings

    Tyler Ridings

    Joined:
    Aug 28, 2009
    Posts:
    201
    Does this support vehicles with more then 4 wheels?
     
  8. newlife

    newlife

    Joined:
    Jan 20, 2010
    Posts:
    1,064
    tyler,
    do you mean vehicle with trailer?
     
  9. ProjectOne

    ProjectOne

    Joined:
    Aug 9, 2010
    Posts:
    442
    Trailer sounds good :)
     
  10. newlife

    newlife

    Joined:
    Jan 20, 2010
    Posts:
    1,064
    anyway, its possible both vehicle with trailer and vehicle with more than 4 wheels
     
  11. saymoo

    saymoo

    Joined:
    May 19, 2009
    Posts:
    850
    Expensive!
     
  12. Tyler Ridings

    Tyler Ridings

    Joined:
    Aug 28, 2009
    Posts:
    201
    Sounds good!You answered my question,ill be saving up for this for sure!
     
  13. dgutierrezpalma

    dgutierrezpalma

    Joined:
    Dec 22, 2009
    Posts:
    404
    I'm considering purchasing this script but I have some questions...


    Questions about the purchase:
    - Previous customers have to pay 37€ for this update... if I purchase this update, would I have to pay again for future updates?
    - People who purchases it from the Asset Store will get new updates automatically... how will other people get the new updates?

    Questions about the Controller:
    - Does it include (or would it be easy to include) an accelerometer-controlled car for iOS / Android devices?
    - Does it have an easy-to-implement interface so we can add easily computer-controlled cars or remote-player-controlled cars?

    Questions about aerodynamics components (such as wings):
    - Can we control the position of each wing?
    - Can we change the "angle of attack" of each wing?
    - Do wings produce drag and downforce or only one of them?
    - Are the aerodynamics forces affected by the force and direction of the wind (as they should)?
    - Do we have an easy way to define the air density (it should modify the drag and downforce of the wing... specially during slipstreaming)?

    Other questions:
    - Is there an easy way to define tire wear and/or fuel consumption?
    - Can we use these scripts for 2-wheels vehicles (such as motorbikes)?
    - Can we add/remove weight at certain position of the vehicle?

    For example: when a Formula1 is running out of fuel, its weight decreases and the center of gravity moves forwards. It would be nice being able to tell the vehicle "remove ___ kg at position(x,y,z)" and have the total mass of the vehicle and the center of gravity recalculated automatically...


    Some of these features are fundamental for me and I have partially implemented some of them for another vehicle physics engine... would you accept code submissions? I really need some of those features, but it can be a little difficult to add (and maintain) new features if you update the code frequently and there isn't an easy way to merge my code with yours...
     
    Last edited: May 28, 2011
  14. newlife

    newlife

    Joined:
    Jan 20, 2010
    Posts:
    1,064
    saymoo,
    are you aware of the prices of other similar products? for example madcar 3 (vehicle physic engine plugin for 3dStudio, 200€) or car-x (vehicle physic middleware for game engines, standard license cost starts from $19500)? not to mention simvex..
     
  15. newlife

    newlife

    Joined:
    Jan 20, 2010
    Posts:
    1,064
    1. no you are not going to pay
    2. with direct access to my FTP server

    1. a previous customer did it easily. im going to deepen this question
    2. the only needed inputs for the car to be computer-controlled cars or remote-player-controlled are throttle and brakes (vertical axes) and steering (horizontal axes). All these variables are exposed.


    1. yes (every wing is a gameobject)
    2. yes
    3. wings produce downforce, if you want to use drag effects too you can increase the cx value of AerodynamicResistance class
    3. at the moment no
    4. yes (air density is defined as a variable)

    1. at the moment no (im evaluating a way to implement this)
    2. planned in the next update
    3. you can remove weight only if you have previously added. so if you want to simulate decreasing weight tank, you should first add a weight with all the fuel you want (adding a gameobject with a boxcollider, a rigidbody and a fixed joint with the parent rigidbody) in the right position, and the during runtime lower the tank's rigidbody weight conveniently.


    we can talk about this. write me a PM with your skype name.
     
  16. techmage

    techmage

    Joined:
    Oct 31, 2009
    Posts:
    2,133
    Really awesome work. Definanetly feels on par to me with alot of major commercial products.

    If I had a use for this I'd definanetly purchase this.

    The only thing that I worry about is that too many people will purchase this and too many unity games will have the same feel on their vehicles...
     
  17. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,816
    Good work. Although I would probably have purchased it if it had built in AI/Pathfinding/Waypoints for AI cars too.
     
  18. dgutierrezpalma

    dgutierrezpalma

    Joined:
    Dec 22, 2009
    Posts:
    404
    I am a previous customer but I didn't have enough time to develop a racing game until now... and you have released a new version of your script just when I have started to work in my prototype, so I wanted to be sure if this new update will include several features I will need for my game (as you can guess, the most important part for me is aerodynamics).

    I'm not completely sure, but I think it is different to apply the drag in the wing position than applying the drag in the center of mass. Even if the drag amount is the same in both cases, it would affect to the understeering / oversteering behaviour of the vehicle.

    The effect of the wind at the longitudinal axis is really easy to implement... instead of using the car speed to calculate the aerodynamic forces, you should use (car speed - wind speed):

    - If there isn't any wind, we only take into account the car speed to calculate the aerodynamic forces.
    - If the wind moves in the same direction than the car, the wind reduces the aerodynamic forces caused by the car speed.
    - If the wind moves in the opposite direction than the car, the wind increases the aerodynamic forces caused by the car speed.

    However, the aerodynamic effect of lateral winds are more difficult to calculate...

    So any rigidbody that I "attach" to the vehicle using some kind of join would be taken into account to calculate the weight and center of gravity of the vehicle automatically?

    Well, you have already implemented (or your are planning to implement) most of features I need... In any case, I'll write you an email to purchase this update and talking about these topics.
     
    Last edited: May 29, 2011
  19. newlife

    newlife

    Joined:
    Jan 20, 2010
    Posts:
    1,064
    eh eh eh i didnt think about this eventuality..
    Anyway its very easy to change drastically the feel of the vehicles by changing the engine response (changing the torque curve) and the tire response (changing the tire parameters).
    Btw thank you for your appreciation.
     
  20. newlife

    newlife

    Joined:
    Jan 20, 2010
    Posts:
    1,064
    you can do it for free using UnitySteer
    http://www.arges-systems.com/
     
  21. newlife

    newlife

    Joined:
    Jan 20, 2010
    Posts:
    1,064
    yes you are right. I fixed this, Now you can change both the angle of attack and the drag coefficient of the wing

    yes, to implement a real wind force (not only longitudinal), it would need a in-depth examination.
    Probably I would need to calc the angle between the longitudinal car speed and and wind speed in order to calc the longitudinal and lateral component of the wind force. it remain to understand how to apply the lateral wind force..

    yes.its really that simple :) the only thing is that you have to remember is to uncheck the collision between the other car's colliders in the layer collision matrix (since all cars colliders should share the same layer just unckeck self layer collision).

    ok
     
  22. dgutierrezpalma

    dgutierrezpalma

    Joined:
    Dec 22, 2009
    Posts:
    404
    Not sure if it is a good implementation, but this is my current implementation:

    1) For each wing, instead of having one pair of drag-downforce coefficients, I have 3 different pairs of coefficients (one for each axis).
    2) Transform the wind speed from World Space into Local Space.
    3) Calculate separately the aerodynamics forces for each axis using (car speed - wind speed).
    4) Finally, apply all the forces.


    In my case:
    downforce coefficient in Z-axis > downforce coefficient in Y-axis > downforce coefficient in X-axis


    I suppose the most difficult part is finding the right coefficients for a realistic behaviour.

    Very nice :)
     
    Last edited: May 29, 2011
  23. newlife

    newlife

    Joined:
    Jan 20, 2010
    Posts:
    1,064
    Hi everybody,
    this is just to tell you that the new version of the documentation for UnityCar is almost finished (90%). Its a wiki, so it should be easy for everyone to consult.

    The new link is
    http://migliortestesso.com/unitycar/wiki/

    Let me know what you think about it.

    PS: Im going to release an update of UnityCar with some bug fixes. All the buyers are called to send me an email in order to receive the update.
     
  24. llavigne

    llavigne

    Joined:
    Dec 27, 2007
    Posts:
    977
    NewLife,

    What values need to change to accomodate a car that's 1/5 scale ?
     
  25. newlife

    newlife

    Joined:
    Jan 20, 2010
    Posts:
    1,064
    Hi llavigne,
    you have to change (decrease in a way proportional to the scale reduction) these values:

    1) cardynamics tire rate (set it to 0)
    2) weight
    3) suspension spring rate front
    4) suspension spring rate rear
    5) damp and rebound
    6) power multiplier
    7) grip factor
    7) drivetrain clutch max torque
    8) cardynamics dampAbsRoadVelo (set it to 17 or even more (THIS IS VERY IMPORTANT, its an error correction when car is going very slow))
    9) of course you have to set the right value for the width and radius of the wheels.
     
    Last edited: Jul 15, 2011
  26. Taku-chan-gamer

    Taku-chan-gamer

    Joined:
    Nov 18, 2019
    Posts:
    32
    hold up why is there 2 posts for UnityCar?