From 15c6f6a4a824711a2bdfb06a76f0093e837dc3e4 Mon Sep 17 00:00:00 2001 From: "T.J. McGrath-Daly" Date: Thu, 16 Dec 2021 10:35:25 +0800 Subject: [PATCH] =?UTF-8?q?When=20the=20tag=20of=20Region=20Force=20compon?= =?UTF-8?q?ent=20changed=EF=BC=8Cthe=20AABB=20of=20the=20component=20shoul?= =?UTF-8?q?d=20be=20appended=20to=20=20m=5FpendingAabbUpdates=20of=20local?= =?UTF-8?q?=20wind=20handler=20in=20wind=20bus=20after=20the=20wind=20prov?= =?UTF-8?q?ider=20delete=20the=20Force=20Region=20entity.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: T.J. McGrath-Daly --- Gems/PhysX/Code/Source/WindProvider.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Gems/PhysX/Code/Source/WindProvider.cpp b/Gems/PhysX/Code/Source/WindProvider.cpp index 3090cea062..3490e79412 100644 --- a/Gems/PhysX/Code/Source/WindProvider.cpp +++ b/Gems/PhysX/Code/Source/WindProvider.cpp @@ -159,6 +159,12 @@ namespace PhysX AZStd::swap(m_entityTransformHandlers[index], m_entityTransformHandlers.back()); m_entityTransformHandlers.pop_back(); + // When deleting entity from handler's m_entities, the AABB should be appended to m_pendingAabbUpdates + // for local wind handler to broadcast OnWindChanged to notify relative entities of wind changes in OnTick(). + m_pendingAabbUpdates.push_back(); + ColliderShapeRequestBus::EventResult(m_pendingAabbUpdates.back(), + entityId, &ColliderShapeRequestBus::Events::GetColliderShapeAabb); + m_changed = true; } }