Hi Toni,

On Wed, 2005-08-17 at 14:13 +0200, [EMAIL PROTECTED] wrote:
> Hi,
> 
> I'm trying to setup a camera as I'm used
> to do with OpenGL, that is, setup a perspective
> projection matrix and a position/orientation
> matrix as modelview matrix (I almost always
> used gluLookAt for the latter). I used an
> example a tutorial sample that displays the
> spinning donut. All I want to do is to setup
> a certain position for the camera. I used
> the code below but translation part of the camera
> setup has no effect! What's wrong with it?
> I also removed the "showAll" call on the SimpleSceneManager
> object. The camera seems to be posiitoned on a default
> position at (0,0,0) or something similar. (I see the donut
> rotating around me).

The problem is that the beacon is on top of your objects. That's the way
to do camera-relative objects (as the object is in the same coordinate
system as the camera resp. its beacon). Give the beacon a separate Node
(it doesn't even have to be in the scenegraph) and things should work.

Alternatively you can use a MatrixCamera, which directly takes modelview
and projection matrix. Word of warning: OpenSG's MatrixLookAt is
designed for OpenSG and gives you the inverse of OpenGL's lookat.

Hope it helps

        Dirk




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to