How to process Jittery Vehicles ?

[b]
1> Have PxInitVehicleSDK and PxVehicleSetBasisVectors been called before the first execution of PxVehicleUpdates? Check the error stream for warnings.

2> Does the length scale of PxTolerancesScale match the length scale of the vehicle (eg. 100 if centimeters are used)? Update PxTolerancesScale::length as appropriate.

3>Is the natural frequency of the spring too high/timestep of simulation too small for reliable simulation? See Section PxVehicleSuspensionData for more details and update the natural frequency or timestep accordingly. Remember that the timestep can be updated per vehicle with PxVehicleWheelsSimData::setSubStepCount.

4>Are the maximum suspension droop and compression set to values that allow some suspension motion?

[/b]

[b]My Vehicle has just very small Jitter when it falled onto the ground before fully static.
I have read the Guide and the reason 1> 2> 4> is correct.
But I’m not really clear about reason 3>
How to tune the natural frequency of the spring or timestep of simulation ?

I have fix the frame timestep = 0.01667s in UE4 ,the same as VehicleSample timestep.

I will give my demo video below
[url]http://www.iqiyi.com/w_19rv9jwhkt.html[/url]

I think the reason is that the StickyTireConstraint isn’t active…[/b]

Does the Center of Mass Position or Susp/Tire AppCMOffset Position affect the Jitter ?

I have implement my VehiclePlugin in UE4 but it will jitter a few seconds before fully static…

mark

Does the Center of Mass Position or Susp/Tire AppCMOffset Position affect the Jitter ?

Yes, they change the torques that are applied to the vehicle.

Could you rerun that with a large substep count and see what happens?

[b]I find it very strange…
If I set substep count = 1,the Jitter will continue a few seconds then static
If I set substep count = 3/substep count = 6,the Jitter will continue for a long time and not static

I also want to know How to Debug PhysX Source Code in UE4 ?
I think the most possible reason is the StickyTireConstraint not active…[/b]

You can compile UE4 with all third party libs in debug. In BuildConfiguration.cs just set

bDebugBuildsActuallyUseDebugCRT = true;

and recompile.

You can also compile with just physx in debug by modifying GetPhysXLibraryMode in PhysXBuild.cs. You will then need to make sure that the dlls also load with debug versions. This is done in LoadPhysXModules in PhysXLibs.cpp. The code should automatically load the correct dlls but if you get a crash it is likely that it has loaded profile dlls instead of the debug ones. It is straightforward to change the code to fix this.

With these changes you should be able to run in Development Editor config and have physx running in debug.

Unfortunately,
I have set bDebugBuildsActuallyUseDebugCRT = true,
But After recompile There are no PhysXDEBUG.dll or PhysXDEBUG.pdb in The Directory Binaries/ThirdParty/PhysX/Win64/VS2015.
Just have PhysXCHECKED.dll and PhysXPROFILE.dll

I also find some strange things.
I package MyVehiclePlugin and import to the UE4 DefaultVehicleProject.
Then I set substep count = 3/substep count = 6 and Simulate MyVehicle,the Jitter disappear
I think the reason is about some configurations of PhysX in UE4…

I thought that physx debug libs shipped with ue4 but perhaps this isn’t the case.

You should be able to build the debug libs and dlls yourself by following these instructions. You’re basically going to build physx from the command line.

  1. In the cmd window navigate to /Engine/Build/BatchFiles/

  2. RunUAT.bat BuildPhysX -TargetPlatforms=Win64 -TargetConfigs=debug -TargetCompilers=VisualStudio2015 -SkipSubmit -SkipCreateChangelist