[osg-users] Add loaded model to a Camera Manipulator

Robert Osfield robert.osfield at gmail.com
Fri Nov 6 00:40:03 PST 2015


Hi James,

It's hard to know what is amiss as we don't know how the CameraManipulator
is written and how exactly everything is glued together.

As general note, the OSG's doesn't require the use of CameraManipulator,
you can set the viewer's Camera's ViewMatrix yourself on each new frame if
you expand on frame loop into it's consitent parts i.e.

while(!viewer.done())
{
    viewer.advance();
    viewer.eventTraversal();
    viewer.updateTraversal();


viewer.getCamara()->setViewMatrix(computeTheAppropriateViewMatrixToPlaceViewInsideCar());

    viewer.renderingTraversals();
}


Robert

On 5 November 2015 at 21:34, James Nute <newten82 at gmail.com> wrote:

> Hi,
>
> I'm trying to create a camera manipulator that looks like I am driving a
> model around from the inside. So far I have tried adding the node to a the
> camera manipulator as well as the camera itself as a child. I even added
> the loaded model to a PositionAttitudeTransform node and then adding the
> PositionAttitudeTransform node to the camera. Effect is always the same.
>
> The manipulator works as expected moving around the scene but the model is
> stationary.
>
> Thank you!
>
> Cheers,
> James
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=65556#65556
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20151106/04799c90/attachment-0002.htm>


More information about the osg-users mailing list