diff --git a/Gems/PhysX/Code/Source/EditorShapeColliderComponent.cpp b/Gems/PhysX/Code/Source/EditorShapeColliderComponent.cpp index 4ee51d7787..832145d016 100644 --- a/Gems/PhysX/Code/Source/EditorShapeColliderComponent.cpp +++ b/Gems/PhysX/Code/Source/EditorShapeColliderComponent.cpp @@ -121,8 +121,14 @@ namespace PhysX void EditorShapeColliderComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible) { - incompatible.push_back(AZ_CRC("LegacyCryPhysicsService", 0xbb370351)); - incompatible.push_back(AZ_CRC("PhysXShapeColliderService", 0x98a7e779)); + incompatible.push_back(AZ_CRC_CE("LegacyCryPhysicsService")); + incompatible.push_back(AZ_CRC_CE("PhysXShapeColliderService")); + incompatible.push_back(AZ_CRC_CE("AxisAlignedBoxShapeService")); + incompatible.push_back(AZ_CRC_CE("CompoundShapeService")); + incompatible.push_back(AZ_CRC_CE("DiskShapeService")); + incompatible.push_back(AZ_CRC_CE("QuadShapeService")); + incompatible.push_back(AZ_CRC_CE("TubeShapeService")); + incompatible.push_back(AZ_CRC_CE("ReferenceShapeService")); } const AZStd::vector& EditorShapeColliderComponent::GetSamplePoints() const diff --git a/Gems/PhysX/Code/Tests/ShapeColliderComponentTests.cpp b/Gems/PhysX/Code/Tests/ShapeColliderComponentTests.cpp index cbaf4b4625..fce427d9d3 100644 --- a/Gems/PhysX/Code/Tests/ShapeColliderComponentTests.cpp +++ b/Gems/PhysX/Code/Tests/ShapeColliderComponentTests.cpp @@ -338,33 +338,6 @@ namespace PhysXEditorTests ValidateInvalidEditorShapeColliderComponentParams(0.f, -1.f); } - TEST_F(PhysXEditorFixture, EditorShapeColliderComponent_ShapeColliderWithUnsupportedShape_HandledGracefully) - { - UnitTest::ErrorHandler unsupportedShapeWarningHandler("Unsupported shape"); - UnitTest::ErrorHandler rigidBodyWarningHandler("No Collider or Shape information found when creating Rigid body"); - - // create an editor entity with a shape collider component and a cylinder shape component - // the cylinder shape is not currently supported by the shape collider component - EntityPtr editorEntity = CreateInactiveEditorEntity("ShapeColliderComponentEditorEntity"); - editorEntity->CreateComponent(); - editorEntity->CreateComponent(LmbrCentral::EditorCompoundShapeComponentTypeId); - editorEntity->Activate(); - - EXPECT_EQ(unsupportedShapeWarningHandler.GetExpectedWarningCount(), 1); - EXPECT_EQ(rigidBodyWarningHandler.GetExpectedWarningCount(), 1); - - EntityPtr gameEntity = CreateActiveGameEntityFromEditorEntity(editorEntity.get()); - - // since there was no editor rigid body component, the runtime entity should have a static rigid body - const auto* staticBody = azdynamic_cast(gameEntity->FindComponent()->GetSimulatedBody()); - const auto* pxRigidStatic = static_cast(staticBody->GetNativePointer()); - - PHYSX_SCENE_READ_LOCK(pxRigidStatic->getScene()); - - // there should be no shapes on the rigid body because the cylinder is not supported - EXPECT_EQ(pxRigidStatic->getNbShapes(), 0); - } - TEST_F(PhysXEditorFixture, EditorShapeColliderComponent_ShapeColliderWithBoxAndRigidBody_CorrectRuntimeComponents) { // create an editor entity with a shape collider component and a box shape component diff --git a/Gems/Vegetation/Code/Source/Components/ReferenceShapeComponent.cpp b/Gems/Vegetation/Code/Source/Components/ReferenceShapeComponent.cpp index 5700abb7cb..620e43457d 100644 --- a/Gems/Vegetation/Code/Source/Components/ReferenceShapeComponent.cpp +++ b/Gems/Vegetation/Code/Source/Components/ReferenceShapeComponent.cpp @@ -50,6 +50,7 @@ namespace Vegetation void ReferenceShapeComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& services) { services.push_back(AZ_CRC("ShapeService", 0xe86aa5fe)); + services.push_back(AZ_CRC_CE("ReferenceShapeService")); } void ReferenceShapeComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& services)