Hi

>The idea is when i move the node with a manipulator i move the second
camera in the same time.

You can attach NodeCallback to the second Camera
(Camera::setUpdateCallback) that will follow the node moved by the main
Camera. In your callback you do something like:

camera->setViewMatrixAsLookAt( eye, nodePosition, up )

Nick




On Sat, Jun 21, 2014 at 9:20 AM, Jérôme Béchu <[email protected]>
wrote:

> Hi,
>
> I am new with OpenSceneGraph,
> I try to have two camera, one main, and second one follow a node in my
> scene.
> The idea is when i move the node with a manipulator i move the second
> camera in the same time.
>
> If you want my drity source code, go to pastbin and add u3eC0eBi to the
> url.
>
> So my idea is to use a osgManipulator::Constraint to grab manipulator
> info, and use osgGA::CameraManipulator to move the camera.
>
> I succeed to have two camera with differents positions, and have my
> manipulator (based on demos).
> But I am not able to move my second camera, :(
>
> Is it the good way to do that ?
> Where I am wrong ?
>
> Thank you!
>
> Cheers,
> jerome[/code]
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=59846#59846
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
trajce nikolov nick
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to