I've done some more digging, and the problem seems to be with the scaling
of the animation. The solution for me is to export the fbx in blender with
Apply Scalings set to "FBX All", this fixes the problem with the incorrect
bound.
I'm not sure why it doesn't seem to be a problem in the Autodesk
I managed to do that inside the `handle` method:
osg::Vec3d eyePos;
osg::Matrix matrix = _viewer->getCameraManipulator()->getMatrix();
eyePos = matrix.getTrans();
lat = eyePos.y();
lon = eyePos.x();
alt = eyePos.z();
On Wednesday, August 22, 2012 at 3:21:20 PM UTC-3,
Back at it again...
I'm using a Brazil georeferenced map, so I know what coordinates are good
enough to be above the country, high enough to see it all, looking down:
(...)
osgViewer::Viewer viewer;
viewer.setSceneData( root.get() );
osg::ref_ptr controller = new OVNIController();
Hi Rodrigo,
are you sure about the values of your eye point. As you say your map is
georeferenced but it is certanly projected. So you should check the
projection system used by your map (maybe have a look at
https://epsg.io/?q=Brazil%20kind%3APROJCRS). I think the main problem
may be there.
Hi Sam,
I managed to implement my own manipulator (OVNIController, derived from
FirstPersonManipulator), but still can't change the camera position (I want
to change it in the beginning of the program, and also when the user press
the Home key).
You can see my code here:
Dear Robert,
this doesn't answer the question. Most of us use a manipulator, so the
question is: how to change camera position using a
CameraManipulator. Is this possible?
Rodrigo.
On Thursday, April 17, 2014 at 5:22:32 AM UTC-3, Robert Osfield wrote:
>
> Hi Becky,
>
> If you viewer has a
Hi Becky,
I managed to change the camera position using a manipulator called
controller.
viewer.setCameraManipulator(controller);
viewer.realize();
// osg::Matrix matrix;
// matrix.makeLookAt( osg::Vec3(), osg::Vec3(), osg::Vec3() );
osg::Quat quad;
// matrix.get(quad);
7 matches
Mail list logo