Fixed crash and asserts when heightfield is used without Terrain World

Signed-off-by: Sergey Pereslavtsev <pereslav@amazon.com>
This commit is contained in:
Sergey Pereslavtsev
2022-01-28 17:14:21 +00:00
parent ff79931d1d
commit fc02783200
3 changed files with 19 additions and 3 deletions
+6 -1
View File
@@ -694,7 +694,12 @@ namespace PhysX
const float minYBounds = -(numRows * heightfieldShapeConfig.GetGridResolution().GetY()) / 2.0f;
auto heights = heightfieldShapeConfig.GetSamples();
if (heights.empty())
{
return;
}
for (int xIndex = 0; xIndex < numColumns - 1; xIndex++)
{
for (int yIndex = 0; yIndex < numRows - 1; yIndex++)