diff --git a/src/ui/map3D/Pixhawk3DWidget.cc b/src/ui/map3D/Pixhawk3DWidget.cc index a9cd4007fc63da7bd8fb424d225fa05d9ce1efc9..96a42d9e40d3f89dde3931358c230010ff296ac4 100644 --- a/src/ui/map3D/Pixhawk3DWidget.cc +++ b/src/ui/map3D/Pixhawk3DWidget.cc @@ -243,6 +243,11 @@ Pixhawk3DWidget::display(void) robotYaw = uas->getYaw(); } + if (followCamera) + { + recenter(robotY, robotX, -robotZ); + } + robotPosition->setPosition(osg::Vec3(robotY, robotX, -robotZ)); robotAttitude->setAttitude(osg::Quat(-robotYaw, osg::Vec3f(0.0f, 0.0f, 1.0f), robotPitch, osg::Vec3f(1.0f, 0.0f, 0.0f),