Replies: 3 comments
-
try
camera->setViewMatrixAsLookAt( eye, center, up )
…On Mon, Mar 6, 2023 at 5:01 PM Daoudou ***@***.***> wrote:
Hello.
I have another problem. I use setViewMatrix in my camera to have a view in
my world but how can i do to enter in the world ?
if i what to in my skydome the camera stay outside the skydome.
If i don't mistake placing the camera at a certain point P applies a
translation of -P to the whole world.
camera->setViewport(new osg::Viewport(iViewport[0], iViewport[1],
iViewport[2], iViewport[3]));
camera->setProjectionMatrix(projectionMatrix);
camera->setViewMatrix(modelViewMatrix);
[image: Capture]
<https://user-images.githubusercontent.com/98310378/223147168-aae21a90-328b-4edd-8c55-6d93d03d5f8d.PNG>
Thanks in advance.
SOUFFOU
—
Reply to this email directly, view it on GitHub
<#1208>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC7ND7EU76I2GX3YL5U7XQLW2X34RANCNFSM6AAAAAAVRHRNUI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
trajce nikolov nick
|
Beta Was this translation helpful? Give feedback.
-
Okay i will try it thanks I will also see if I can associate its with the modelViewMatrix that I get from my OpenGL project to have the same view dynamically. |
Beta Was this translation helpful? Give feedback.
-
Problem solved 👍 I get the modelViewMatrix and the projectionMatrix of opengl in OpenSceneGraph
I create a first camera and i set it in the first camera
Get the LookAt matrix
Get the camera of my viewer and calulate the position of the camera with the LookAt of the first camera
(Yes, i take my head a lot ) Thanks. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello.
I have another problem. I use setViewMatrix in my camera to have a view in my world but how can i do to enter into the world ?
if i what to in my skydome the camera stay outside the skydome.
If i don't mistake placing the camera at a certain point P applies a translation of -P to the whole world.
Or i have to change the projection like it's like the lens of a camera.
Thanks in advance.
SOUFFOU
Beta Was this translation helpful? Give feedback.
All reactions