Merge pull request #767 from aws-lumberyard-dev/shape-collider-not-clearing-fix
fix bug with failing to clear shape collider config
This commit is contained in:
@@ -215,10 +215,6 @@ namespace LmbrCentral
|
||||
m_entityId = entityId;
|
||||
m_currentTransform = AZ::Transform::CreateIdentity();
|
||||
AZ::TransformBus::EventResult(m_currentTransform, entityId, &AZ::TransformBus::Events::GetWorldTM);
|
||||
m_currentNonUniformScale = AZ::Vector3::CreateOne();
|
||||
AZ::NonUniformScaleRequestBus::EventResult(m_currentNonUniformScale, m_entityId, &AZ::NonUniformScaleRequests::GetScale);
|
||||
m_polygonPrism->SetNonUniformScale(m_currentNonUniformScale);
|
||||
m_intersectionDataCache.InvalidateCache(InvalidateShapeCacheReason::ShapeChange);
|
||||
|
||||
AZ::TransformNotificationBus::Handler::BusConnect(entityId);
|
||||
ShapeComponentRequestsBus::Handler::BusConnect(entityId);
|
||||
@@ -226,6 +222,11 @@ namespace LmbrCentral
|
||||
AZ::VariableVerticesRequestBus<AZ::Vector2>::Handler::BusConnect(entityId);
|
||||
AZ::FixedVerticesRequestBus<AZ::Vector2>::Handler::BusConnect(entityId);
|
||||
|
||||
m_currentNonUniformScale = AZ::Vector3::CreateOne();
|
||||
AZ::NonUniformScaleRequestBus::EventResult(m_currentNonUniformScale, m_entityId, &AZ::NonUniformScaleRequests::GetScale);
|
||||
m_polygonPrism->SetNonUniformScale(m_currentNonUniformScale);
|
||||
m_intersectionDataCache.InvalidateCache(InvalidateShapeCacheReason::ShapeChange);
|
||||
|
||||
AZ::NonUniformScaleRequestBus::Event(m_entityId, &AZ::NonUniformScaleRequests::RegisterScaleChangedEvent,
|
||||
m_nonUniformScaleChangedHandler);
|
||||
|
||||
|
||||
@@ -326,6 +326,7 @@ namespace PhysX
|
||||
else
|
||||
{
|
||||
m_shapeType = !shapeCrc ? ShapeType::None : ShapeType::Unsupported;
|
||||
m_shapeConfigs.clear();
|
||||
AZ_Warning("PhysX Shape Collider Component", m_shapeTypeWarningIssued, "Unsupported shape type for "
|
||||
"entity \"%s\". The following shapes are currently supported - box, capsule, sphere, polygon prism.",
|
||||
GetEntity()->GetName().c_str());
|
||||
|
||||
Reference in New Issue
Block a user