diff --git a/include/ignition/rendering/base/BaseCamera.hh b/include/ignition/rendering/base/BaseCamera.hh index e48fe887e..9c57bfcd9 100644 --- a/include/ignition/rendering/base/BaseCamera.hh +++ b/include/ignition/rendering/base/BaseCamera.hh @@ -351,7 +351,7 @@ namespace ignition { math::Pose3d targetCamPose = math::Pose3d(this->followOffset, this->WorldRotation()); - targetCamPose += this->followNode->WorldPose(); + targetCamPose = this->followNode->WorldPose() * targetCamPose; math::Vector3d pos = this->WorldPosition() + (targetCamPose.Pos() - this->WorldPosition()) * this->followPGain; @@ -371,7 +371,7 @@ namespace ignition } else { - targetPose += this->trackNode->WorldPose(); + targetPose = this->trackNode->WorldPose() * targetPose; } math::Pose3d p = diff --git a/include/ignition/rendering/base/BaseJointVisual.hh b/include/ignition/rendering/base/BaseJointVisual.hh index 07f688371..08f587e66 100644 --- a/include/ignition/rendering/base/BaseJointVisual.hh +++ b/include/ignition/rendering/base/BaseJointVisual.hh @@ -406,7 +406,7 @@ namespace ignition // get rotation of joint visual in model frame ignition::math::Quaterniond quatFromModel = - (this->LocalPose() + parentInitPose).Rot(); + (parentInitPose * this->LocalPose()).Rot(); // rotate arrow visual so that the axis vector applies to the model // frame. diff --git a/include/ignition/rendering/base/BaseNode.hh b/include/ignition/rendering/base/BaseNode.hh index 479ca351a..549023d25 100644 --- a/include/ignition/rendering/base/BaseNode.hh +++ b/include/ignition/rendering/base/BaseNode.hh @@ -428,7 +428,7 @@ namespace ignition return pose; } - return pose + parent->WorldPose(); + return parent->WorldPose() * pose; } //////////////////////////////////////////////////