Prechádzať zdrojové kódy

Added support for Physx::ArticulationComponent in ROS2FrameComponent (#347)

Signed-off-by: Michał Pełka <[email protected]>
Michał Pełka 2 rokov pred
rodič
commit
d83825968d

+ 3 - 1
Gems/ROS2/Code/Source/Frame/ROS2FrameComponent.cpp

@@ -92,7 +92,9 @@ namespace ROS2
                     m_entity, AZ::Uuid("{B01FD1D2-1D91-438D-874A-BF5EB7E919A8}")); // Physx::JointComponent;
                     m_entity, AZ::Uuid("{B01FD1D2-1D91-438D-874A-BF5EB7E919A8}")); // Physx::JointComponent;
                 const bool hasFixedJoints = Internal::CheckIfEntityHasComponentOfType(
                 const bool hasFixedJoints = Internal::CheckIfEntityHasComponentOfType(
                     m_entity, AZ::Uuid("{02E6C633-8F44-4CEE-AE94-DCB06DE36422}")); // Physx::FixedJointComponent
                     m_entity, AZ::Uuid("{02E6C633-8F44-4CEE-AE94-DCB06DE36422}")); // Physx::FixedJointComponent
-                m_isDynamic = hasJoints && !hasFixedJoints;
+                const bool hasArticulations = Internal::CheckIfEntityHasComponentOfType(
+                    m_entity, AZ::Uuid("{48751E98-B35F-4A2F-A908-D9CDD5230264}")); // Physx::ArticulationComponent
+                m_isDynamic = (hasJoints && !hasFixedJoints) || hasArticulations;
             }
             }
 
 
             AZ_TracePrintf(
             AZ_TracePrintf(