Commit 6488d18a authored by hengli's avatar hengli

Partially fixed follow camera issue.

parent 8ecb33cc
......@@ -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),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment