I’m attempting to use a heightfield as the collision shape for my procedurally generated terrain, as documentation suggested this would be the most appropriate shape for my case.
However, I’ve yet to find any samples of heightfields in the SDK or online, for that matter. In the documentation, a very concise example is given, but neither documentation nor the samples is clear on the order of translation via the local pose and scaling via the heightfield parameters. Whether the patch of samples is centered on the shape’s pose or if it begins at the shape’s pose and extends in the local X and Z axes is also unclear.
Additionally, while trying to discover this my self through experimentation, the scene seems to have no debug points, lines, or triangles. I haven’t been able to establish any form of collision with my heightfield, even with default values and sample heights of 0 with scales of 1.0 in all axes. I have set values for all the relevant visualization parameters I could find on the scene, actor, and shape:
PhysXScene->setVisualizationParameter(physx::PxVisualizationParameter::eSCALE, 1.0f); PhysXScene->setVisualizationParameter(physx::PxVisualizationParameter::eCOLLISION_SHAPES, true);
Other actors seem to collide with each other and, even without setting their own visualization actor and shape flags, increase the number of debug visualization data in the scene’s render buffer, but the height field does not.
I’m at a loss for further debugging at the moment - might there be suggestions as to how to proceed with debugging this situation?