Moved if section to the top
Signed-off-by: Sergey Pereslavtsev <pereslav@amazon.com>
This commit is contained in:
@@ -687,12 +687,6 @@ namespace PhysX
|
||||
[[maybe_unused]] const AZ::Vector3& colliderScale,
|
||||
[[maybe_unused]] const bool forceUniformScaling) const
|
||||
{
|
||||
const int numColumns = heightfieldShapeConfig.GetNumColumns();
|
||||
const int numRows = heightfieldShapeConfig.GetNumRows();
|
||||
|
||||
const float minXBounds = -(numColumns * heightfieldShapeConfig.GetGridResolution().GetX()) / 2.0f;
|
||||
const float minYBounds = -(numRows * heightfieldShapeConfig.GetGridResolution().GetY()) / 2.0f;
|
||||
|
||||
auto heights = heightfieldShapeConfig.GetSamples();
|
||||
|
||||
if (heights.empty())
|
||||
@@ -700,6 +694,12 @@ namespace PhysX
|
||||
return;
|
||||
}
|
||||
|
||||
const int numColumns = heightfieldShapeConfig.GetNumColumns();
|
||||
const int numRows = heightfieldShapeConfig.GetNumRows();
|
||||
|
||||
const float minXBounds = -(numColumns * heightfieldShapeConfig.GetGridResolution().GetX()) / 2.0f;
|
||||
const float minYBounds = -(numRows * heightfieldShapeConfig.GetGridResolution().GetY()) / 2.0f;
|
||||
|
||||
for (int xIndex = 0; xIndex < numColumns - 1; xIndex++)
|
||||
{
|
||||
for (int yIndex = 0; yIndex < numRows - 1; yIndex++)
|
||||
|
||||
Reference in New Issue
Block a user