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]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.
[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;
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.
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…