A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Discussion in 'Assets and Asset Store' started by NWHCoding, Apr 8, 2020.
Excellent! Thank you.
Hello, why is my car still shaking after it has come to a complete stop?The car in your demo scene is the same thing.Is there any way to get him to rest completely, not sleep.thank you
First check that you have v1.3.x installed as there were some changes to the static friction which solved the issue. Unity 2019.3 or newer is required.
How come the back tires bends/tilts in/outwards sometimes? You can see at 1:10 mark. And other lots of other times in the video. Not the up and down motion.
*** edit *** never mind. It appears like tires do behave like that when 4x4ing.
Wow , lovely asset NWH
Most military and offroad trucks have wheels that pivot around the differential so the camber varies a lot from the extended to the compressed suspension position. I would suggest checking any military or similar 6x6, 8x8, etc. truck.
Thanks. If everything goes to plan v1.4 is going to be even better as I am implementing sub-stepping into the physics engine. So far so good.
What is the recommended physics time step to use?
Depends on your platform. If you can afford it 0.01 is great for desktop and will give you much better quality than then default 0.02. Still, sometimes (mobile, many vehicles) this is not possible so stick with the lowest you can use but avoid anything above 0.02. 0.016667 (60Hz) is a good compromise.
I tried the default pc demo and tried the long truck with lots of tires and hooked up the trailer but when you reverse with the trailer it doesn't move at all. I mean like you cannot reverse the trailer. The trailer seems to act like a brake when reversing.
Does the weight of the trailer affect the vehicle pulling it?
Thank you for reporting this. More than likely the trailer has "Brake On Reverse" or similar option enabled.
Yes, the weight of the trailer affects the vehicle pulling it since the two are connected by a physics joint so the weight of the trailer is effectively "added" to the pulling vehicle. NVP2 is fully physics based and everything is done through Rigidbody forces so if it affects PhysX (or whichever physics backend you are using), it affects NVP2.
My car skates very easily, I've adjusted the SlipCoefficient for every wheel, and it's not the SlipCoefficient I want.Could you please tell me what else can control the vehicle sideslip?Thank you very much
Working right now on an update that will solve the slip issues with physics substepping. The lateral slip currently has a small bug that can use wrong slip calculation that is intended for static slip for low speed slip instead. I will have a working tech demo for the new update in about a day or two at max.
Thank you very much for your help.
But, the speed is lost very quickly.Why is that?
WheelController has a 'drag' field. Apart from that there are engine losses that might be on the higher side. Will give this one a look. Is the speed lost quickly when the clutch is engaged or when rolling with clutch disengaged?
Small dev update:
Physics sub-stepping is working and nearly release ready in NVP2. Needs a bit more testing as the multiplayer will need some love too due to the changes.
WheelController has also received some work over the past few days with overall improvements both internally and externally. I will be posting a changelog as soon as I am done with the testing.
Edit: Here is a link to the WheelController demo with sub-stepping implemented. This is very close to the release version: https://drive.google.com/file/d/1B4dXRai8vvBV-6bZnDS3ZcVgD-Ked537/view?usp=sharing
The NVP2 test is up if anyone is interested. Sports car needs some more tuning and the 8x8 is not included due to a bug I am working on but Lada and Monster Truck are about there: https://drive.google.com/file/d/1dm67btT6r6Is0vVOp_De2jq4tfITd8kH/view?usp=sharing
Is the Lada meant to topple over its nose when braking, something seems very off for a car to do that? Is there any way to turn of the reduction in steering at speed or reduce it?
If you can please wait a few days for 1.4 update which changes and greatly improves on many things though implementing physics sub-stepping. Latest demo is here: https://drive.google.com/file/d/1dm67btT6r6Is0vVOp_De2jq4tfITd8kH/view?usp=sharing
Also, the Lada in the current version does have a combination of too stiff longitudinal friction and high center of mass. Please try the demo above (Win64) and see if you like the updated behavior better. Feedback is always welcome.
You have done a great job on making this asset. I have tried the latest demo and it just doesn't feel right to me, the red car feels very unnatural on accelerating and braking, I cant really judge the handling as the steering is so limited at any kind of speed it just makes everything feel like its understeering. The red car also seems bounce about a lot, never seen a car do that in real life. And still impossible to do doughnuts.
Bouncing is due to the mesh collider polys so you are going over the 'seams' all the time which makes it so. Need to up the resolution on the road mesh.
As for the rest - that is why it is a test. The slip circle is getting some love today (in the test it was commented out hence no donuts and understeer). Also, some other areas need adjustment too but I wanted to put out a test built for people to try sub-stepping which is most apparent at lower speeds. Where before powertrain ran at ~10 updates for one FixedUpdate (and wheel update), now powertrain, wheels and the Rigidbody are all running at multiple updates per FixedUpdate and with no to little performance cost. This results in much tigher friction, esp. at lower speeds where the vehicles would always feel as they were drifting a bit.
I will be posting a demo when all the things are finalized, this was more of a 'oh look it is working' build .
Please try now. A few things were sorted out, including friction circle. Doughnuts are working now too.
Handbrake is a bit too twitchy at high speeds for my liking so that is the next thing to investigate.
NVP2 Test Build Download
Edit: Just got rid of the understeer so a new build will be up in a few hours.
Okay, the release candidate for v1.4 is up (same link as above).
Beta for v1.4 is ready. If somebody wants to try it out send me a PM.
Well done on a very impressive and comprehensive looking asset. If I didn't have my own system yours would be tempting
Version 1.4 has been submitted for review and should be available in 1-2 days.
* Implemented physics sub-stepping. Vehicles now run at higher update rate than the rest of physics. Despite this the performance is same to slightly better due to optimizations.
* Revised friction and friction circle calculations. Eliminated excessive understeer.
* Many small improvements and bug fixes to both VehicleController and WheelController.
* Added adaptive smoothing to WheelController visual.
* Added "Show Advanced Settings" option to WheelController. Only basic options are now displayed by default which reduces clutter.
* Improved obstacle force calculation.
* Improvements to WheelController.
* Add latching handbrake option.
* Added option to calculate load coefficient from custom curve or automatically (default).
* Physical properties now can only be changed out of play mode or through scripting before the vehicle is initialized. This is a performance optimization.
* Reworked and fixed air brake hiss sound.
* Fixed TrailerHitchModule Attach On Play option not attaching the trailer.
* Fixed Ackerman steering bug.
* Fixed OnPointerUp not registering when multiple touches are present resulting in stuck inputs on mobile.
Hi, in 1.4 update has a very slow acceleration. I have also tried in a fresh new project and the acceleration is very slow compared with previus versions.
The previous behavior was unrealistic. If you have wheel spin you can improve acceleration by increasing longitudinal force coefficient on WheelController. The other two causes could be clutch that is too slow to engage or the obvious one: lack of power on the engine. Doubt that it is the last one.
Version 1.4.1 is on the way with the following changes:
* NRigidbody is now added to exisiting vehicles automatically if missing.
* Fixed null event throwing errors in VehicleController.
* Fixed "No Input Provider" warning even when 'Auto Set Input' is false.
* Fixed wheels falling through ground when not added as output to powertrain component and the vehicle state is toggled during playtime.
* Fixed high powered RWD vehicles pulling to one side when going straight.
* Fixed TrailerHitchModule Attach On Play option not attaching the trailer (again).
If I bought the first version, do I need to buy the second now?
An update has been released - buy it? =)
NVP1 and NVP2 are separate assets with not much in common so there is an upgrade price.
You already responded to this several months ago.
In any case, I said I HOPE OR WISH, not that it was done.
Thanks for reiterating the answer.
Ah, I knew it was familiar from somewhere. The Asset Store notifications decided to highlight the wrong post for some reason so I automatically replied without checking the date. My bad.
Regarding Ashul's issues of NWH conflict with other packages, I'm wondering if you are aware of a conflict between NWH and Steamwork.net. My understanding is that NWH give error with Steamwork.net packahe for sharing "InputSystem" namespace.
I'm willing to buy NWH but I would like to know if has been opportunity to detect / test / correct this issue.
Obviously steamwork.net is a must for many projects and can't be surrounded.
Some info about that?
https://steamworks.github.io/ -- Steamworks .NET C# Wrapper
Actually - all scripts in NWH Vehicle Physics 2 are under NWH or NWH.[AssetName] namespace so highly unlikely that that is causing any issues. What could be happening is the fact that Unity for some reason does not check namespaces when importing scripts so it is prone to overwriting any existing scripts with the same name.
InputSystem namespace is a namespace from Unity.InputSystem (their 'new' input solution that will replace InputManager in the future) so there should be no issues.
Edit: Just tried importing Steamworks into NVP2 project and 0 issues. All I did was drag the Steamworks unitypackage as it says in the guide. IF Steamworks requires InputManager or InputSystem to be active you can do that by going to Project Settings > Player > Input and choosing Both. That is what I recommend in the docs anyway.
v1.5 is on the way with the following changes:
* Restructured the asset to prevent errors when trying to import multiple NWH assets in the same project.
* Fixed terrain texture issue when the vehicle goes over the edge of a terrain.
* Improvements to WheelController's damper. Some re-adjustment will be needed on existing vehicles. Damper now has separate bump and rebound curves.
* Fixed major damper bug that rendered damper ineffective under high spring velocities.
* Added warning for Powertrain > Wheels ordering.
* Transmission now calls ReconstructGearList() automatically after the number of forward or reverse gears has changed or a different gearing profile has been assigned.
* Renamed NWH.VehiclePhysics2.Input.Input to InputHandler to prevent confusion with UnityEngine.Input.
* Added deadzone setting to InputManager and InputSystem VehicleInputProviders.
* Fixed 'Brake On Reverse Direction' not working in some cases.
* Fixed InputHandler.Vertical returning wrong value under braking.
* Fixed GroundDetection querying terrain texture out of bounds.
* TrailerHitchModule now searches for trailers across all loaded scenes.
* Fix input sticking on scene reload when using SteeringWheelInputProvider.
NWH Vehicle Physics 2 is now on sale!
just bought nwh2 installed on unity 2019.3 and cant run due to errors:
Library\PackageCache\email@example.com\InputSystem\Editor\Internal\EditorHelpers.cs(52,27): error CS0117: 'AssetDatabase' does not contain a definition for 'MakeEditable'
Library\PackageCache\firstname.lastname@example.org\Editor\State\WindowState.cs(718,21): error CS0103: The name 'PlayModeView' does not exist in the current context
Hello, could you PM me the invoice so I can check which version it is exactly?
This seems like an import issue on the Unity side as none of these two errors are caused by my asset directly.
-The engine component checks for damage and stops working if too much damage has been taken. The transmission gets damage too but I don't see any way for it to effect the vehicle, unlike the engine that got checks for damage in the code. Am I missing something?
- When changing vehicles all other vehicles go to "sleep", but I want to control them by AI script.
how do i choose what vehicle get player input without forcing other vehicles to "Sleep"?
- throttle goes from 0 to 1. how do i make the AI reverse?
- No, not missing anything. The transmission does not have any damage effects.
- Depends on your use case. You can either configure the vehicle changer to not put everything to sleep, you can manually put vehicles to sleep as need or you can use different state settings for the AI vehicles.
- There is a "Vertical" axis that acts as a combined brake and throttle that was put in there for AI use. 1 for full throttle, -1 for brakes/reverse. So myVehicleController.input.Vertical.
I still don't get how do I choose a vehicle to control and then how to stop "possessing" it.The vehicle changing scrip just deals with what sleeps and what awakes but can't find how to take control over a vehicle and then just stop at will
From now on owners of NWH Vehicle Physics 1 or 2 can also get the WheelController3D asset for free from the Unity Asset Store.
Hello I just aquired the asset, I've to say I tested the previous version demo and I saw some flaws in behaviour and did not aquire. I was at that moment using other physics system for prototyping and feeled better but new demo really feels very good and so I purchased. Congrats. I can´t wait to start messing around. In my view you know if a car physics is good in ther first corner XD.
I am glad you like it more now. The difference is more than likely in the new friction model, physics sub-stepping and the fixed damper bug.
Can you guide me how to do the following: I am creating a side scroller monster truck stunt game and only need the car to go straight - not slip or steer at all (even on jumps). I tried restricting the rigidbody rotations but the vehicle behaves weird. What will be the best way to achieve this?
May be you could try add two invisible walls on each side and add a physics material of friction 0
Actually, contraints might be a good way to go but since v1.4 and physics sub-stepping implementation constraints are buggy. This is because NRigidbody (the sub-stepping solution) does not support constraints but I have added this to the TODO list for the upcoming update.
If you are making a 2D game or want a similar effect you might try to set the Y rotation of the vehicle to 0 and rigidbody.angularVelocity.y also to zero. If you do not want vehicle to be able to roll you would do that also for the Z axis (assuming you want your vehicle to travel along the X-Z plane).