Browse Source

Partially fixed follow camera issue.

QGC4.4
hengli 15 years ago
parent
commit
6488d18aad
  1. 5
      src/ui/map3D/Pixhawk3DWidget.cc

5
src/ui/map3D/Pixhawk3DWidget.cc

@ -243,6 +243,11 @@ Pixhawk3DWidget::display(void) @@ -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),

Loading…
Cancel
Save