NWH Vehicle Physics

NWH Vehicle Physics 2 is now available. Check it out here.

3306287--271001--Main.png

Vehicle physics package suitable for wide range of vehicles. Realistic, easy to use and heavily customizable.

Wheel Controller 3D, a custom in-house wheel solution, has been used for wheel physics while the rest of the system had been written from the ground up.

General features:
• Fast vehicle setup with quick start video or included manual.
• Seven vehicle prefabs of different types are included: sports car, sedan, 8x8 truck, monster truck, tank, city bus and semi with trailer.
• Suitable for wide range of applications.
• Runs on both desktop and mobile devices.
• Uses custom in-house wheel solution – Wheel Controller 3D – for 3D ground detection and high level of customizability.
• Per-wheel surface detection based on terrain textures or object tags. Different friction curves and effects for each surface.
• Suspend option for inactive vehicles which minimizes impact on performance while keeping basic functionality.
• Character vehicle changer that works with any character controller / game object, including other vehicles.
• Helper scripts such as analog and digital gauge controllers, camera and vehicle changers, center of mass and downforce adjusters, etc.

Vehicle Physics Details:

Engine
• Realistic engine power and torque calculation with adjustable power curve and RPM range.
• Functional forced induction.

Transmission
• Gear ratios and final gear ratio.
• Dynamic shift point based on load.
• Three transmission types: Automatic, Automatic Sequential and Manual.
• Manual transmission supports both sequential and H-pattern shifting.
• Center differential: Open, Limited Slip, Locking or Equal.

Axles
• Geometry settings for each axle: Steering Angle, Pro/Anti Ackermann Steering, Toe, Camber, Caster and Anti-roll Bar.
• Adjustable power, braking and handbrake distribution.
• Per-axle differentials: Open, Limited Slip, Locking and Equal.
• Supports solid axle (check Monster Truck in the demo).

Damage
• Optimized queue-based mesh deformation that spreads processing over multiple frames.
• Damage influences vehicle performance and handling.

Audio
• All audio sources are set up automatically.
• Sound can be adjusted through Audio Mixer for all vehicles or though inbuilt mixer for each vehicle and each effect individually.
• Engine, forced induction, gear change, suspension, surface, skid, crash, air brake, horn and blinker sounds.

Effects
• Vehicle light system with low beam, high beam, stop and brake lights, blinkers.
• Can be used with any number of lights of any type and/or emissive materials.
• Persistent and well optimized mesh-based skidmarks.
• Exhaust particle effects based on engine state.
• Per-wheel dust and smoke particle effects based on surface the wheel is on.

Input
• Desktop input using standard input manager with mouse steering option.
• Mobile input through on-screen steering wheel and pedals or tilt controls.

Trailer
• Trailer is a vehicle in itself meaning all the effects that work on a vehicle work on a trailer too.
• Trailer gets input routed from the vehicle it is attached to which results in functional lights, braking, damage and even steering if needed.
• Built-in attach / detach functionality where any vehicle can attach any trailer with correct tag.

Fuel
• Fuel consumption calculation using engine’s efficiency.
• Readouts in l/100km, km/l and US mpg.

UI
• Universal analog and digital gauge controllers and lights for use in dashboard or HUD.

Code
• Modular code structure for easy modification and upgrading.
• C# source code with XML comments on all public members.
• Tooltip explanations for all visible variables.

European Truck and Trailer and Super Car models provided by GAME READY 3D MODELS .

Try it out:

More info:

Video trailer:
https://www.youtube.com/watch?v=VAnNgXbvFZo

For the rest of the videos click here.

Demo scene with telemetry and adjustable vehicle settings:

Other links:

Package is now available for purchase at the Unity Asset Store (link).

10 Likes

Great news, will be upgrading from off road vehicle physics kit when released.
Will this system incorporate the wheel controller system or is it designed to run along side.

Edit : as for a suggestion, how about a snow mobile?

It uses Wheel Controller 3D for wheel physics instead of wheelcollider and the rest is written from ground up, now over 3 months in development.

2 Likes

That’s great, was going to purchase Wheel controller 3d to use with original physics system.
Will hold off for to purchase upgrade then.

When you release this !

I made this thread so everyone can see the progress. If everything goes to plan it should be finished before the end of December, add a week or two for it to get reviewed. That is the goal.

1 Like

An update.

Trailer module is finished and here are some details about it. If you want me to add some feature feel free to suggest it.

Trailers use the same vehicle controller script that the vehicles use which means they support lights (blinkers, stop lights, etc), effects, braking and even steering. Any input that vehicle receives trailer will receive too. This means that multiple trailers are possible if somebody wants to make a road train or similar.
Each vehicle can attach any trailer that has the correct tag which means that same scene can have e.g. 10 semi trailers and 5 trailers and cars can not attach semi trailers. Attaching trailers is based on adjustable distance (similar to that of Euro Truck Simulator). Since the vehicle controller script has a system that suspends unnecessary functions when vehicle is inactive trailers that are parked have minimal impact on performance while still keeping all the functionality (minus effects and sounds, WC3D is used in single ray mode).

2 Likes

Will you focus to engine and sound for vehicle to make it realistic ?

Well, I am already focusing on it. The goal is to make it easy enough to setup and produce good enough sound. Most developers do not have access to the actual vehicles so I can not actually make a system that would require engine samples at certain RPM, accelerating samples, decelerating samples, etc. so as a compromise I decided to go with single clip engine sound. Currenty the package supports engine, transmission, suspension, forced induction and ground sounds.

3 Likes

Looks great! I’m excited to check it out when you’re ready. :slight_smile:

Currently working on vehicle changer script. Plan is to have 2 different scripts; one classic that just cycles through the vehicles and one that is attached to a “character” (in this case a free-moving camera, but you could attach it to whatever) that offers option to enter vehicle when close enough.

After I am done with that I will setup the vehicles and put on an early WegGL demo so you can try it and suggest things that could/should be changed. I want to do this as early as possible in the development as it is much easier to change things before documentation and all the asset store update stuff.

2 Likes

This looks awesome! Great work.

Hi, will this have soft body tire physics? If not why not :slight_smile:

No, it will not have soft body physics.
Soft body physics are quite performance hungry. This is the reason none of the AAA car games have it (as far as I know). Also, that would render this asset useless for mobile. Sure, one vehicle with soft body physics might run fine on a mobilephone, but 5 or 6 in a single scene - hardly.
I do not feel that soft body physics bring enough to the table for all the cons they have and that is the reason I will not implement them. And also they are mostly useless for high speed vehicles as on a race car there is hardly anything “soft” :slight_smile:

2 Likes

In the past all my assets had custom editors but the layer of complexity and possibility of introducing bugs made me rething that for this asset. Below is what part of the editor editor currently looks like. It is using default Unity class dropdown style look:

There is still custom editor code behind that that handles filling in the needed fields in a newly created vehicles, shows warnings, etc.

3 Likes

All in one spot :slight_smile:

7 Likes

That looks awesome mate. :slight_smile:

Looks great.
A discount for Wheel Controller 3D owners would be nice :wink:

1 Like

Don’t worry, I will offer upgrade (it is not exactly upgrade bug that is what Unity calls it) to Wheel Controller 3D owners - I am not planning on selling same stuff twice to the same people :smile:
There will also be an upgrade offer for the owners of the old and deprecated Offroad Vehicle Physics Kit.

5 Likes

Check this link at the end of the first post in this thread for the first development build (Windows 64-bit only). Demo scene is not finished and some features are not implemented, may not work properly or may not work at all. Think of it as a development snapshot.

First camera will folow the vehicle, second camera you can rotate around by holding LMB and the rest of them depend on configuration. Default key bindings can be found by pressing “Show Help” button at the top of the screen or in the configuration window that appears after opening the .exe, under “Input” tab.

All feedback is welcome. Have fun :slight_smile:

1 Like