PxVehicleWheelQueryResult always returning 0 for tireSurfaceType

Hey all!

I’m not sure why but it seems to not find the material I added to PxVehicleDrivableSurfaceToTireFrictionPairs.

To test this I created 4 surface types

for (int i = 0; i < 4; i++)
    {
        surfaceTypes[i].mType = i;
    }

    surfaceMaterials[0] = GetPhysics()->createMaterial(0.1f, 0.1f, 0.1f);
    surfaceMaterials[1] = GetPhysics()->createMaterial(0.2f, 0.2f, 0.2f);
    surfaceMaterials[2] = GetPhysics()->createMaterial(0.7f, 0.7f, 0.0f);
    surfaceMaterials[3] = GetPhysics()->createMaterial(0.4f, 0.4f, 0.4f);

All this gets passed to PxVehicleDrivableSurfaceToTireFrictionPairs.

I set my ground material to 0.2f, 0.2f, 0.2f, and I confirmed that tireSurfaceMaterial from PxVehicleWheelQueryResult is giving me these values but somehow tireSurfaceType is still 0. That should have been 1 in this case right?

Does anyone know what’s causing this?

Did you call PxVehicleDrivableSurfaceToTireFrictionPairs::setup()?