Why zero hit distance in PxVehiclePhysXRoadGeometryQueryUpdate
is interpreted as non hit?
#74
-
Something similar is in the sweep query type: So, if hit distance is exactly zero, result is like there are no hit at all. But according to |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
In the sweep case, this looks like a bug and we will have a look at it. For raycasts, it's a different story. The ray does not start at the wheel center but at the top of the wheel (see PxVehicleComputeSuspensionRaycast). The motivation for this is to handle scenarios where the wheel at max compression penetrates into the ground. Penetrations are only handled up to a certain distance (the wheel diameter, approximately). Beyond that, it's treated as no collision which was just a design decision. Since distance=0 means initial overlap, we ignore it at that point (see PxLocationHit::hadInitialOverlap()) (but just to be clear, for raycasts it would mean the wheel is sort of penetrating the ground by a distance of a wheel diameter at this point). |
Beta Was this translation helpful? Give feedback.
In the sweep case, this looks like a bug and we will have a look at it. For raycasts, it's a different story. The ray does not start at the wheel center but at the top of the wheel (see PxVehicleComputeSuspensionRaycast). The motivation for this is to handle scenarios where the wheel at max compression penetrates into the ground. Penetrations are only handled up to a certain distance (the wheel diameter, approximately). Beyond that, it's treated as no collision which was just a design decision. Since distance=0 means initial overlap, we ignore it at that point (see PxLocationHit::hadInitialOverlap()) (but just to be clear, for raycasts it would mean the wheel is sort of penetrating the gr…