[osg-users] locking 3d text in front of camera

Peter Wraae Marino osghelp at gmail.com
Sat Jul 26 23:26:59 PDT 2008


Hi,

if you look at this tutorial:
http://osghelp.com/readarticle.php?article_id=3

get an account here (it's free):
http://osghelp.com

you must have an account before you can view the tutorial.
the tutorial has an example how to place 3D text infront of the camera
using projection matrix and view matrix.

Of course the osgText can be aligned to the camera using methods it has
in it's own class, but the tutorial above will
also work for other 3D objects if you need to align them to the camera.
please note that the tutorial isn't really about object placement and
camera,
but it uses that technique as an example and it sound like it's what you
need.

regards,
Peter Wraae Marino
http://osghelp.com


On Sun, Jul 27, 2008 at 2:06 AM, Joe Lyga <jdlyga at gmail.com> wrote:

> Hi osg-users.  I'm kind of new to openscenegraph and 3d programming, and
> I'm having a problem.  I'm trying to position a 3d text object to be in a
> fixed position directly in front of the camera, so it's always in the same
> position in the lower left corner of the screen.  It would be much easier
> to do this as a 2d overlay, but in this case it needs to be 3d.  I have
> the camera's view matrix to work with, and I can get the eye, look, and up
> vectors from that to position the text.  I have a feeling that I have to
> do some vector math here, but I haven't been able to find anything that
> helps yet.  Does anyone have any ideas?
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>


-- 
Regards,
Peter Wraae Marino

www.osghelp.com - OpenSceneGraph support site
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080727/0f4219b8/attachment-0003.htm>


More information about the osg-users mailing list