I am using PhysX vehicle with a large triangle mesh representing my terrain.
After upgrading my code to use PhysX 3.3 I have encountered a weird problem - when i init the vehicle position (using setGlobalPose) to a point located far from the center (for example (10000,10000)) and apply acceleration, the wheels are spinning, the RPM rises but the vehicle doesn’t move.
I have checked the probable causes listed in the troubleshooting section but i haven’t found anything wrong.
I also tried taking a piece from the remote location and transforming it to (0,0) and then the vehicle drives properly
Any idea will be welcomed
Thanks in advance,
Judit
The first step is to determine if the suspension raycasts are returning the correct results at (10000,10000). Can you please take a look at PxWheelQueryResult::isInAir ? If this has value true then the suspension raycasts are failing to hit the mesh.
If PxWheelQueryResult::isInAir is false then please look at PxWheelQueryResult::tireFriction. If this is a very small value then the car will be unable to generate any acceleration.
The structure PxWheelQueryResult stores quite a lot of useful data for diagnosing this kind of problem. It’s worthwhile checking the value of each member variable to make sure that they match expectations eg is the normal correct.
I have similar problem as @judyland. What could be wrong if isInAir() returns true and raycast returns one hit? When car is in the air, isInAir() returns true and there are no hits, so raycast works ok.
I am using PhysX 3.2.1
Thanks
This sounds like quite a different problem. The original problem was that the car could drive near the origin but not far the origin. In your case the car never seems to drive even near the origin.
One thing to check is if your car is in neutral gear. From your description it could be that your car is in neutral.
Hi,
I have a similar problem but with a much smaller terrain (200x200). I simulated a tank using physx and when it drives fast (actually not that fast, just 15-20 km/h) and it performs a rotation than such that it slips sidewards it may not stop slipping → it seems as it is slipping on ice at a constant speed. It is possible to rotate but the slipping direction stays the same. Usually, trying to drive in the opposite slipping direction does not slow down the slipping. Sometimes I have managed to get it to stop but then it is only possible to drive along one axis and if you try to drive into another direction it slips sidewards as if it drives agains an obstacle but in the pvd there is also no obstacle visible.
It becomes worse when the farther the tank is away from the origin. To closer it comes to the edge of the static triangle mesh representing the ground the less speed and rotation is required to make it slipping such that is is not possible to stop it anymore.
In contrast, close to the origin, the vehicle behavior is as it should be.
This sounds like the friction is decreasing as you move further from the origin. Can you please take a look at the friction values experienced by the tank tires?
Thanks for your help. I tried to repro this with the data you sent me but I’m unable to repro the bug in my test suite. I sent you a pm with more details.
I think I found the problem concerning the sliding vehicle. Our framework is partially compiled without the -malign-double flag which makes it incompatible with the sdk but the compiler doesn’t mention anything when linking those object files. This led to a very short time step (1ms) among other side effects. I changed the sdk makefiles by removing the flag and now it works on a 32-Bit Ubuntu. I also tested it on a 64-Bit Ubuntu system and there it works out of the box since -malign-double is activated by default for the 64-Bit gcc compiler.