Hi,

I do work in trackball mode. What I am trying to do is to change  with keyboard the position from were the camera is looking to the central node. I introduced the next in handle function.


if (ea.getKey()==osgGA::GUIEventAdapter::KEY_Tab)
                {
                    flushMouseEventStack();
                    _thrown = false;
                    osg::Vec3d eye(0.0,-60*bs->radius(),0.0);
                    osg::Vec3d center(0.0,0.0,0.0);
                    osg::Vec3d up(0.0,0.0,1.0);
                    computePosition(eye,center,up);
                    us.requestRedraw();
                    us.requestContinuousUpdate(false);
                    return true;
                }

When Tab is pressed the colocation of the camera is ok, up vector is 0,0,1 but when I press F2 where the value of the eye is (60*bs->radius(),-60*bs->radius(),0.0) is not. I thought the problem was with the value of up vector.

Robert Osfield <[EMAIL PROTECTED]> escribió:
Hi Maider,

The NodeTrackerManipulator assumes a local z up as the up vector which
it rotates about. There isn't any customization available to alter
this. There is a trackball mode in the NodeTrackManipulator which
doesn't care about up orientation, perhaps this would be appropriate.

Robert.

On 6/15/06, Maider Maider wrote:
> Hi,
>
> I am working with NodeTrackerManipulator to configure the view of the
> scene. I manage to set the camera where I want but I can´t deal with the
> vector up tha I need to set the "inclination" of the camera. Can anybody
> help me explaining how it should be defined? Are those x,y,z absolute or
> relatives?
>
> Thanks,
>
> Maider
>
>
> __________________________________________________
> Correo Yahoo!
> Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
> Regístrate ya - http://correo.yahoo.es
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
Regístrate ya - http://correo.yahoo.es

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to