Search Unity

Assets NWH Vehicle Physics

Discussion in 'Works In Progress - Archive' started by NWHCoding, Nov 30, 2017.

?

Which networking solution do you want to see implemented?

Poll closed Jan 20, 2019.
  1. UNet - Unity Networking, getting deprecated sometime in the future

    1 vote(s)
    4.8%
  2. Mirror - Community replacement for UNet (https://github.com/vis2k/Mirror)

    6 vote(s)
    28.6%
  3. Photon

    12 vote(s)
    57.1%
  4. None - I will be implementing my own solution

    2 vote(s)
    9.5%
  1. obstudio

    obstudio

    Joined:
    Sep 30, 2016
    Posts:
    58
    Ok some more
    - tire temperature and wear - both with impact on handling and both based on friction, distance, etc.
    - distance counter.
     
  2. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,692
    Thank you for suggestions :)

    One note: upgrade for OVPK will be available until 11th of February (6 more days). This is because by offering the upgrade option all the reviews from OVPK are shown as reviews for NVP which is not correct as those reviews are talking about a totally different asset.
     
  3. obstudio

    obstudio

    Joined:
    Sep 30, 2016
    Posts:
    58
    - nitro
    - drafting
     
  4. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,692
    I hope you meant drifting? :D
     
  5. obstudio

    obstudio

    Joined:
    Sep 30, 2016
    Posts:
    58
    no, drift counter was earlier
    i think in one of NFS game drafting was refuelling nitro
     
  6. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,692
    Version 1.2 will be submitted today to the store so expect it in a few days, after it gets approved.

    Bug fixes:
    • Manual clutch not working properly with manual transmission.
    • [WC3D] Wheels locked up when in neutral on a decline / incline with no user input.
    • Handbrake coefficient set to 0 on all axles on some of the vehicles.
    • Revlimiter not causing fuel to cut off / no speed limit per gear.
    • All cameras on playground (mobile) scene are set to disabled.
    • Manual transmission sometimes ignores the input.
    • Trailer attach detach sometimes ignores user input.
    • When using multiple trailers some of the trailers might not show attach prompt.
    • Brakes toggling between on and off state when standing still under braking.
    • Incorrect default clutch engagement curve.
    • Fixed reverse gear ordering when gears list is constructed.
    • Added missing tooltip explanations for trailer custom inspector.
    Features:
    • Replace semi truck with GR3D’s model.
    • Added power reduction option for trucks with no trailer.
    • Horn sound.
    So not much in a way of features but for the moment I am working on polishing existing code. More features will come with 1.3 which is planned for next week. If you find any bugs please do report them so I can remove them as soon as possible.

    If anyone wants to try the v1.2 build here it is: https://drive.google.com/open?id=1GRFXbpgMLPp9GNXNJy852iC22oOFXQvm
     
    Last edited: Feb 6, 2018
  7. Davidbillmanoy

    Davidbillmanoy

    Joined:
    Jul 7, 2014
    Posts:
    120
    Is this physics engine a sim?
     
  8. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,692
    It is not a hardcore sim but definitely leaning more towards sim than arcade. For example all the values are physics based, torque and power are correctly calculated and transfered through gearbox with gear ratios to axles that split torque depending on axle type and then pass it to wheels which are also physically correct and use slip-based calculations (Pacejka). So from that standpoint it is a simulation. On the other side integration is not used and some aspects (such as clutch) are approximated rather than simulated. While this might take away from realism some it certainly allows for much better performance.
    Hope this answers your question. Any specific aspects of physics engine that interest you?
     
  9. obstudio

    obstudio

    Joined:
    Sep 30, 2016
    Posts:
    58
    pretty nice
    1. while driving 100km/h I can set R gear without problem
    2. while driving with attached trailer arrow in speedometer works strange
    3. while driving on R speedometer shows speed (I'm not sure if in real any car show it)
    4. add some postprocessing stack to demo build
     
  10. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,692
    Will look into this first thing in the morning.
    1. 2. - will be checked and fixed.
    3. Sure does. Most of the newer vehicles that have digital speedometers do. It is not exactly a rocket science to clamp it to positive only if somebody wants it so it will not be changes.
    4. It was there but was removed due to the Asset Store policy that the standard assets should not be included into the package. I like having demos look the same as the package once it is downloaded from the store and that is the reason why I removed it in the end. Actually, there is still the preset inside the asset package.
     
  11. Quatum1000

    Quatum1000

    Joined:
    Oct 5, 2014
    Posts:
    889
    Hi,
    would it be possible to have the low/high speed angle in +/- 1 instead of 5 please?

    Untitled-2.jpg
    And is some willing to test these settings with the black car. The goal is to surround the island on the track as fast as possible and without losing control. Would be great to have some reply.

    The High-Speed-Angle should be set to about 7-8 but its not possible unfortunately.
     
  12. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,692
    Ok, no problem. Just so you know these are only demo settings and actual setting in the inspector can be set normally to any value.

    Edit: Done, I will post the new build when the update is out.
     
  13. Ryry36

    Ryry36

    Joined:
    Nov 10, 2017
    Posts:
    32
    Hi I plan on making a game similar to Spintires. How difficult would it be to implement softbody tire physics? or even Terrain Deformation? These are features that would be really awesome!
     
  14. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,692
    Unfortunately, soft body tire physics is not something that will be implemented, at least not soon. It would require a total rewrite of WC3D, would be quite CPU intensive (not suitable for mobile) and I am not exactly sure that you would want to do something like that in Unity - UE4 with it's C++ would be much better performance wise for both softbody physics and terrain deformation. Now, terrain deformation is not that difficult but not worth doing with default Unity terrain (which is something most of the people are using) because - again - of performance. I had a video of this on my channel a few years back but I am quite sure I removed it. You basically make an indent in terrain where the wheel has passed with depth that depends on the force that was put to the ground. This works but you would need very high resolution default terrain for it to look even remotely OK which leaves you with either a small terrain with good performance or large terrain with low performance. So custom terrain that can add polygons to the requested area would be the way to go.

    You are mentioning Spintires - that game has started with development 2007 if I am correct. They have won multi-threaded game award from Intel in 2009 which tells you a lot about the level of optimization they needed to go through. Not to mention that the state of multi-threading is what it is in Unity at the moment.
    So my answer is no to both. If you want to make a game that would have all the features of the Spintires and done as well with the same performance you will have to do it in UE4 or similar where you can optimize the code much better.
     
  15. Ryry36

    Ryry36

    Joined:
    Nov 10, 2017
    Posts:
    32
    Thanks for the reply! That's unfortunate but it is what it is. I think I will still try to make a similar game just without all the fancy stuff haha
     
  16. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,692
    Spintires is actually the only bigger game (apart from BeamNG) that I know that has softbody physics. None of the AAA games have them since consoles would have merry time running them and development costs would spike up.
    Also, being fancy is not all there is to a game. While Spintires has great physics it was a bit of a flop from the gameplay side.
    Whatever you decide to do with your game - good luck :)
     
  17. Stiffy89

    Stiffy89

    Joined:
    Feb 2, 2017
    Posts:
    6
    hi, i am relatively new to unity and i recently purchased this product and the demo videos look amazing. Just to test out the product, i dragged and dropped the bus prefab from the project into my scene and after playing the scene, there was immediately a whole host of exceptions thrown into the console regarding input "clutch", "handbrake" etc. Im using the generic input system that comes with unity at the moment and after putting in all the required inputs, there is still this one particular error being thrown. I notice that the vehicle controller script disabled at runtime and upon enabling the script, this particular error kept getting thrown. Please refer to the two images below.

    NullReferenceException: Object reference not set to an instance of an object
    NWH.VehiclePhysics.InputStates.get_Vertical () (at Assets/VehiclePhysics/Scripts/Vehicle/Input/InputStates.cs:99)

    it seems to think that the vertical and horizontal inputs are not available? The current horizontal and vertical axis are set to the standard aswd or up,down,left,right keys. I cant seem to work out why its not working? Is there a specific script im missing that needs to be added? I have also tried toggling thru the various inputs (standard, mouse etc etc).

    Thank you for your help in advance!
     

    Attached Files:

  18. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    @Stiffy89: Does the demo scene work? If you look in the VehiclePhysics folder in your project, you'll find two files: README.txt, that details how to set up your project, and ProjectSettings.zip, which contains custom settings files that can be copied to your ProjectSettings folder. Keep in mind that these settings will overwrite your current settings, so use them with care. At a minimum, you'll probably want to copy the InputManager and TagManager assets, but make note of any inputs or tags you've already added first, since they will be overwritten by the new files.
     
  19. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,692
    Hello and sorry for your problems.

    @FargleBargle is correct on this one - no need to setup all the inputs by hand and you can just copy the InputManager to your project settings folder as per README.txt as a starting point and then customize from there. Of course, setting each input one-by-one from scratch is also a viable, albeit not fun, method.

    As for the other error I would suggest checking out the manual. There is a whole chapter dedicated just to getting a vehicle running. Since you are using a prefab you can skip most of it for now and just check the part mentioning _VehicleManager. NVP vehicles have InputStates.cs script where, as the name suggests, states of the inputs are stored. Now, this script and the vehicle itself does not do any input handling - that part is done through either DesktopInputManager script or MobileInputManager script. You can drag a prefab of this too from the vehicle prefabs folder. This is so that a single vehicle can use different input scripts without changing the actual vehicle code, e.g. you could make your own input script very easily (no need tho).
    Probably the best thing would be to check the manual and the demo scene and see how the things are set up there.

    The error you are getting for input is not actually because of the input (script will not throw any errors if input manager does not exist in scene, vehicle just won't move and that is it) but because of the trailer tag not being assigned. This is an error on my part since I used FindGameObjectsWithTag function which throws error if tag is not assigned. This will be fixed and pushed along with other changes today. Send me a PM or email if you need it sooner.

    Until then just add a new tag named "Trailer" and you are good to go.
     
    Last edited: Feb 14, 2018
    FargleBargle likes this.
  20. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,692
    One notice (related to demo scene only).
    If somebody is getting error related to character controller it is because Unity decided to bundle the required standard assets themselves (after telling me I could not do it) and in doing so they only bundled in Characters and Environment, without dependencies that normally get imported such as Utility and which are required for Characters to work properly.
    So if you are getting the error just delete the bundled standard assets and import again as per README.txt.
    I am replacing their character controller with mine so there is no more problems like these in the future - you will still be able to use the vehicle changer with any character controller, it is just that the default included will not be the one in the standard assets.
     
  21. Barritico

    Barritico

    Joined:
    Jun 9, 2017
    Posts:
    374
    Hi.

    I have problems with the "island" scene.

    - All models appear with half the wheels under the ground.
    - The SEDAN model. You can move the direction, the front wheels turn ... but nothing advances. When I turn off the engine, the wheels keep turning.
    - The RACE model. I flat the accelerator and it goes up to 1500 rpm. It does not advance. Power value to zero and torque value to zero. The wheels do not turn.

    And I have not tried anything else because I'm sure it's some error on my part and it solves quickly.

    Thank you.

    EDIT

    After reset Unity all vehicles works fine EXCEPT RACE MODEL.

    Thanks.
     
    Last edited: Feb 14, 2018
  22. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,692
    Glad you managed to get it working, I really do not have an idea what would result in a completely bugged scene. If I have to guess something probably went wrong with the import process.

    Could you check if the transmission is set to other than manual or try changing the gears manually using the R and F buttons?
     
  23. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,692
    Version 1.3 will be pushed to the store in a few hours after the testing is complete and will be visible when it gets approved (a few days).

    Changes:
    • [WC3D] Support for calipers and other non-rotating objects that move with the wheel but do not rotate.
    • Added example script for setting up a vehicle at runtime.
    • Fixed errors when initializing the script at runtime from another script.
    • Fixed ‘Trailer tag not found’ error when Trailer tag does not exist.
    • Fixed possible errors with standard assets because Unity importer fails to import standard asset dependencies when importing required standard assets.
    • Visual improvements to the demo scene.
     
    FargleBargle likes this.
  24. nbelkin

    nbelkin

    Joined:
    Jul 22, 2012
    Posts:
    7
    Hello! Really great asset.
    So, can u help me, what is the correct solution for gradually increasing the maximum speed over time (for example, I want to change smoothly max speed from 100 kmh to 200 kmh over 2 minutes). Should I increase only max power, or also change max rpm values?
     
  25. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,692
    If you want to do it by changing the engine values then power will be the way to go. Changing maxRpm just changes the RPMs at which the max power will be achieved but does not affect power in general. By increasing maxRpm you would get what is called 'high revving' engine and vice versa.

    This image visualizes it nicely. X axis (bottom one) is what you change by changing maxRpm (7000 for the image) and the Y axis (vertical) is what you change by changing max power (450 for this image), and the shape of the curve is effectively the power curve in the inspector:



    There is also a speed limiter option under the General foldout. It is in m/s so 100kph would be 100 / 3.6 = 27.78 m/s and double that for 200km/h. This is probably a better solution if you need something like a speed limit for a service area or for the first lap. There has been some improvement to speed limiter code that will be up with v1.3 but you can also just replace the code manually with this:

    Code (CSharp):
    1.            
    2. // Speed limiter
    3.             if (speedLimiter != 0)
    4.             {
    5.                 float regulatorThreshold = 0.8f;
    6.                 if (Speed > speedLimiter * regulatorThreshold)
    7.                 {
    8.                     engine.TcsPowerReduction = Mathf.Pow(Mathf.Clamp01((Speed - (speedLimiter * regulatorThreshold)) / (speedLimiter * (1f - regulatorThreshold))), 2f);
    9.                 }
    10.             }
    11.  
    This replaces the whole if block around line 414, just search for 'speedLimiter != 0' in VehicleController.cs and you will see it. Even if you do not touch anything speed limiter will work but it will be less smooth.
    Hope one of these methods work for you.
     
  26. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,692
    One more suggestion.
    If you want to use just a single vehicle without all the vehicle changing stuff you can drag the prefab for that vehicle and add to it "DesktopInputManager" component. Assign vehicle controller by dragging you vehicle to the field and you are good to go. Leave Vehicle Changer empty if you will be using only that vehicle. For multiple vehicles setup such as the one in the demo scene would be much better.
     
  27. CoderPro

    CoderPro

    Joined:
    Feb 21, 2014
    Posts:
    327
    @NWHCoding
    Do you have plan make a drift car physics?
     
  28. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,692
    I am not sure exactly what 'drift car physics' would entail but you can set up a vehicle for drift the same way you would set up a real car. Primarily reducing side friction on the rear wheels and playing with toe and camber and setting the handbrake on the rear wheels will give you a realistic drift vehicle.
     
  29. OdderOtter

    OdderOtter

    Joined:
    Aug 16, 2015
    Posts:
    44
    Sorry to bump, but I didn't see a response so I figured you might have just missed my question!
     
  30. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,692
    Oh, sorry for that. It got buried it seems.
    Motorcycles as such are not supported by the package.
    I had a few questions about this both during WC3D development and NVP development. WC3D can be used just fine for motorcycles but motorcycles have a few different things going on for them then cars and it is hard to have them in the same bucket as cars. They require things such as balancing, counter steering, completely different driver animations, in most cases many driving aids - and this is all motorcycle specific.
     
    OdderOtter likes this.
  31. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,692
    There is a new, pretty large update coming.

    Two new vehicles:

    Car model provided by Game Ready 3D Models and it will replace the current Pagani Zonda which I felt was lacking a bit in quality.
    Car.png

    Type 10 tank. Upcoming update will have support for tracked vehicles. Tracked vehicles have their own friction and slip calculations (due to the huge differences between tires and tracks) and do not support different friction curves like normal wheeled vehicles do but otherwise work like any other vehicle in the package. There have been some modifications that had to be made for such vehicle so testing will take a bit longer than usual.
    Tank.png
    List with all the changes and bug fixes can be found in the TODO.

    If anyone wants to beta test the newest version send me your invoice and I will give you a link to the download.
    Expected release date is end of this month.
     
    FargleBargle likes this.
  32. CodyJMathis

    CodyJMathis

    Joined:
    Dec 10, 2017
    Posts:
    4
    Let me start by saying that this is a fantastic product you have developed. A problem that I constantly find with assets from the Asset Store is that they're made to work and not to be easily extendable for the end-users application however you have managed to make a quality product and allow extreme extend-ability!

    I would like to know, is there a way to specify what is a solid surface vs what is terrain / dirt? I use the Easy 3D roads package to generate road models over my terrain and when driving on the roads mesh surface, it causes dust which would typically be limited to dirt.

    Thanks for such a great product!
     
  33. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,692
    Hello. I'm glad you like the work.

    To answer your question - yes you can. There is a ground type detection system that can detect surfaces by either terrain index (if terrain) and tags. For example, you can say that Asphalt ground material is everything with tag "Road" and "Concrete" or terrain texture index 3 and 5. That looks like this:

    upload_2018-2-25_22-58-36.png

    So called "Ground Detection" script needs to be set up only once (in the demo it is attached to the "VehicleManager" object) and all the vehicles in the scene will use the same common settings. All the fields have tooltip explanations and there is also an explanation in the manual so this should not take more than five to ten minutes to set up.

    Also the road in the demo scene have also been made Easy Roads 3D. As you might notice from the image above Asphalt is everything tagged with "Road" (that is the track that goes around the island) and terrain texture index of 6 (that is the concrete on which all the vehicles start) and so vehicles know that they are on the surface type asphalt, what effects and sounds to use and also what wheel friction preset to use.

    As you can see concrete is the 6th (starts from 0) terrain texture:
    upload_2018-2-25_23-3-47.png
     
  34. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,692
    Beta build for version 1.4 is now available (Windows only): link.
    From now on both Beta builds and TODO will have links at the end of the first post in this thread.

    During the weekend I have revisited the handling characteristics of the wheel controller and worked on improving them. This is the biggest improvement regarding handling since the release of WC3D.
    Update will be be made available on the store at the end of this week, after some more testing.
     
    FargleBargle likes this.
  35. jonnytracker

    jonnytracker

    Joined:
    Sep 13, 2016
    Posts:
    31
    Can you make it multiplayer
     
  36. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,692
    I want to first improve it to some standard, fix the bugs and polish it and then go on to things like Unity Multiplayer / Photon multiplayer in a larger update since it will require a lot of code changes.
     
  37. CodyJMathis

    CodyJMathis

    Joined:
    Dec 10, 2017
    Posts:
    4

    Excellent response and has clarified that portion.

    My next question is regarding the skid mark setup. On various surfaces the skid marks work as expected however after about 5-10 seconds in game and skid mark generation (on the same surface) all skid marks disappear and new skid marks stop being created.

    To make sure this wasn't related to same weird graphics issue, I've tried on various PC's with the same result. Perhaps there is a setting issue somewhere? To the best of my remembrance this is all but stock setup from the instructions.
     
  38. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,692
    Has this happened in version 1.2 (current - known bug) or 1.3 (build available in the first post, should be fixed).
    I know that the TODO is long and not everyone has seen it but that problem has been fixed about a week ago.

    Persistent skid system uses skidContainers - each containing one skid mesh with the preset number of skidmark sections (each section = 2 triangles). Once the mesh reaches the value it is marked as static and a new skidContainer is created. SkidContainers have self-destroy scripts on them that get triggered when skidmark is far enough from the vehicle. Problem was that skidContainer would become deleted before it has been filled and discarded. That means it was still in use when the distance from it to the vehicle would become larger than the set distance threshold and it deleted itself leaving script with a skidContainer with value null.

    This also happened if persistent skidmark was unchecked because self-destruct script was still being attached to the skidContainer which should not have happened.

    Expect the fix towards the end of the week, it is currently in the testing phase.
     
  39. jonnytracker

    jonnytracker

    Joined:
    Sep 13, 2016
    Posts:
    31
    waiting for multiplayer, something with the similar drift engine of NFS Rivals
     
  40. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,692
    Multiplayer will happen but this package is aiming for realism. It uses slip curves, realistic power calculations, etc. while NFS Rivals is as arcade as it gets. You can adjust the vehicle to feel more arcade-y but do not expect NFS-like behavior without heavy modifications. Goal here is to get Drift 3, Project Cars and Asseto Corsa like physics and also to support wide range of off-road vehicles.
     
  41. jonnytracker

    jonnytracker

    Joined:
    Sep 13, 2016
    Posts:
    31
    I dont know much about physics but the thing I like about NFS rivals is, when you are in corner the vehicle is stabilized and you can't really hit the corner.

    So you hit the brakes for 0.3 ms then it starts skiing because it loses its grip on the road.. the tire drift against the speed and rotation of the tire.. i dont know how to explains it.. kind of like the spinin tires in racing games when it starts. The tire rotates 10x againts the speed it is moving forward...

    so you can drift around the corner as long as the road turns. kind of the drift in like movies, very smooth stabilized drift for as long as u hit the accelerator

    the smooth long controlled drift like this ones


    I hope it will be in NWH
     
    Last edited: Feb 27, 2018
  42. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,692
    It already is in version 1.4 which improved on it greatly, but with no drift assists that would help you with it. You seem to have a notion that drifting is just going into the corner and pressing the accelerator. Just check this video:



    Thing is that you need to modulate your throttle, apply handbrake as needed and most importantly - have a vehicle set up for drift. This includes rear wheel drive, stiff differentials, large negative camber, light rear end, etc.
    Try drifting in one of the simulation games mentioned in the earlier post and you will see what I mean.
    I will look into what I can do to make drifts easier for players, possibly another driving aid besides the stability assist that is already in there.
     
  43. CodyJMathis

    CodyJMathis

    Joined:
    Dec 10, 2017
    Posts:
    4

    That makes sense; I am using the current production version.

    Amid all the posts here suggesting this and that - it’s nice to see the dedication towards making this a solid base product to build off which should be the goal for any asset whereas many people I think are looking for a full game that they can relabel.
     
    NWHCoding likes this.
  44. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    Just tried the demo, and love the new vehicles. The 458 is gorgeous, and the tank is my new favorite off-road vehicle. :)

    A few observations and comments though:

    The cars still move if you walk into them. This shouldn't happen. Assuming the character is less than 100 kilograms, and the vehicles are all over 1000 kilograms, and that they're either parked in gear or with the brake set, they should act like immovable objects as far as the player is concerned. Maybe they need a higher static friction when parked?

    The tank seems maybe a bit too easily damaged. It's a tank after all. Also, and I know this is just a demo scene, it would be cool if it could knock down trees and walls when it runs into them. I know - probably outside the scope of the asset. Just indulging in some wishful thinking. I'll probably address some of these things in my own scenes though. ;)

    Any thoughts on providing persistent performance stats? Things like top speed, or lap times? I like your HUD instruments, but find that if I try to read them while driving really fast, I go immediately and directly to the scene of the accident. :(

    Otherwise, I'm quite impressed. Thanks, and keep up the great work.
     
  45. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,692
    Thank you for the feedback.

    The cars moving when you walk into the is exclusively because I am using rigidbody character controller from standard assets which is moved not by force but by position so when you run into another rigidbody it creates a collision. It has nothing to do with static friction as vehicles use the same friction calculation when parked as when active, just with single ray ground detection.

    The damage values have not been tweaked on the tank - it is still on the default values as from when the script was added. Will change it up a bit tomorrow before I publish it.

    Metrics are something that will be added in 1.5 - there were requests for drift counter, odometer, top speed, etc. It is all planned out, just need to implement it.
     
    FargleBargle likes this.
  46. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,692
    Version 1.4 has just been pushed to the Asset Store. It will be available for download as soon as it gets approved - in a day or two.

    Changelog:
    • Tracked vehicle support along with a new demo vehicle - Type 10 MBT.
    • Fixed a bug where axle RPM would be reported incorrectly resulting in vehicles having less power and requiring lower final gear ratio.
    • Improved lateral friction calculation - eliminated high speed instability.
    • Fixed Automatic transmission staying in 2nd gear instead of changing to 1st in some cases. Changed the way low beam / high beam light switching works - turning lights off will also turn off the high beams.
    • Added ‘Ignore Tags’ field to the damage handler. Collisions with the objects that have a tag that is on this list will be ignored.
    • Added performance degradation option under damage. Engine, steering and sound will only be affected by damage if this option is enabled.
    • Removed steer smoothing and replaced it with Degrees Per Second Limit which limits the amount of degrees wheels can turn per second.
    • Fixed clutch being applied while braking in 1st gear and going forward.
    • Improved gear skipping in auto gearbox.
    • Skidmarks sometimes not drawn.
    • Skidmarks sometimes drawn in air / over other objects.
    • Improved response to drivetrain RPM changes.
    • Sand and grass in the demo scene now have their own friction presets. Previously they incorrectly used gravel friction curve.
    • Improved skidmark alpha calculation.
    • [WC3D] Changed the way forward friction coefficient affects the forces. Increasing the coefficient will no longer increase the torque but rather the torque limit before slipping which is correct.
    • [WC3D] Big improvements to the general feel of Wheel Controller.
    • [WC3D] Fixed spring length difference between single and multiple ray modes.
    • [WC3D] Fixed wheel stops spinning if not powered as soon as it loses contact with surface.
    • [WC3D] Fixed bottoming out calculation.
    • [WC3D] Gizmos are only drawn when object selected to reduce clutter.
    • [WC3D] Fixed problem with ground detection not happening at the lateral center of the wheel when side resolution was 1, but rather to the side.
    • [WC3D] Scan ignore layer(s) are now selected through a dropdown with tickable ignore layers.
     
  47. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    Hmm. Then maybe more RB drag, at least when the car is parked, so that it's harder to move, and stops moving immediately after contact? I noticed the car would often continue to creep in the direction it was pushed, even after backing away from it, which probably means the RB drag is set to 0. In my actual game, I'll be using a third person character that doesn't use a rigid body, so this may not be an issue for me at least, but for anyone using the same or similar controller as your demo, player-car collisions seem a bit unrealistic.
     
  48. CodyJMathis

    CodyJMathis

    Joined:
    Dec 10, 2017
    Posts:
    4
    @NWHCoding - I'm curious as to why when applying full throttle after the update (via the W key) the vehicle seems to hang to the left vs going in a straight line? This is on the grass preset and when releasing W it goes straight again. I have not modified any power settings since the previous version and only modified friction as directed in the upgrade read me. Can you provide some insight?
     
  49. NWHCoding

    NWHCoding

    Joined:
    Jul 12, 2012
    Posts:
    1,692
    Since the update the forward slip is correctly related to the lateral slip and as such when the wheels spin lateral slip generally increases. You are mentioning the is on grass preset (if you are talking about demo grass accidentally had gravel preset in previous version) which is now more slippery.

    I will look into it to check if it might be a bug on one of the differentials. Could you tell me if this is on a demo vehicle in the demo scene and what kind of differential vehicle uses?

    Thing that most probably causes this is differential giving more torque to the right side and combined with the reduced lateral friction induces torque steer. On FWD cars torque steer in a straight line is not a problem but on a RWD car such as the red sports car in the demo scene it causes vehicle to rotate.

    Added to the TODO.
     
  50. MoribitoMT

    MoribitoMT

    Joined:
    Jun 1, 2013
    Posts:
    301
    Hi,

    I checked out all drift discussion on the this topic. I am planning make a drift based game. What I exactly need is smooth, continues and controlled drifts for racing track. Does this asset can do this, or any plans on it ?

    Regards.

    This game interesting physics, like maxAngularVelocity is very low, so vehicle is turns slowly side to side, also seems like Y axis is limited, so the car almost never slip out of control on continues drifts.

    Just like in this video
     
    Last edited: Mar 5, 2018