Skip to content

Commit b1d228f

Browse files
committed
Fixed setting of transform for model entities to set the local transform, not world
Signed-off-by: lumberyard-employee-dm <[email protected]>
1 parent 36cfd3e commit b1d228f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Gems/ROS2/Code/Source/RobotImporter/URDF/URDFPrefabMaker.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -569,8 +569,9 @@ namespace ROS2
569569
{
570570
gz::math::Pose3d modelPose = model.RawPose();
571571
AZ::Transform modelTransform = URDF::TypeConversions::ConvertPose(modelPose);
572-
573-
transformComponent->SetWorldTM(AZStd::move(modelTransform));
572+
// Set the local transform for each model to have it be translated in relation
573+
// to its parent
574+
transformComponent->SetLocalTM(AZStd::move(modelTransform));
574575
}
575576

576577
// Allow the created model entity to persist if there are no errors at ths point

0 commit comments

Comments
 (0)