fixing bug with subdivision level for runtime asset colliders and adding caching for collider aabbs

This commit is contained in:
greerdv
2021-04-13 10:50:07 +01:00
parent 87a3dfc968
commit 90e52d69bc
5 changed files with 22 additions and 9 deletions
@@ -330,10 +330,9 @@ namespace PhysX
}
const bool hasNonUniformScale = (AZ::NonUniformScaleRequestBus::FindFirstHandler(GetEntityId()) != nullptr);
// the value for the subdivision level doesn't matter in the runtime, because any approximation of primitives will already have
// happened in the editor, so can pass an arbitrary value here
AZ::u8 subdivisionLevel = 0;
Utils::GetShapesFromAsset(physicsAssetConfiguration, componentColliderConfiguration, hasNonUniformScale, subdivisionLevel, m_shapes);
AZ::u8 subdivisionLevel = physicsAssetConfiguration.m_subdivisionLevel;
Utils::GetShapesFromAsset(physicsAssetConfiguration, componentColliderConfiguration, hasNonUniformScale,
physicsAssetConfiguration.m_subdivisionLevel, m_shapes);
return true;
}