Page 1 of 1

Rotate the camera's sight (without interaction)

Posted: Sun May 22, 2016 11:10 pm
by emerckx
Hello,

I defined the following camera position which looks from a position with a positive x coordinate, to the center of the arena.

Code: Select all

<visualization> <qt-opengl> <camera> <placement idx="0" position="2,0,2" look_at="0,0,1" lens_focal_length="20" /> </camera> </qt-opengl> </visualization>
When I run the experiment, the camera's sight is upside down.
Is there a way to rotate the sight of the camera?
(I've checked the gripping example, but couldn't find how it's done)

Sincerely yours,
Ewout Merckx

Re: Rotate the camera's sight (without interaction)

Posted: Tue May 24, 2016 3:48 pm
by pincy
Hi Ewout,

Try to slightly rotate the camera so that it's not perfectly vertical, and use those values. Just a little nudge is enough.That usually does the trick. If not, I'll see if I can change the code to also specify the Up vector to resolve the ambiguity in the positioning.

Cheers,
Carlo

Re: Rotate the camera's sight (without interaction)

Posted: Thu May 26, 2016 10:57 pm
by emerckx
Hello Carlo,

Thank you for the solution, it works.

I've added some random number numbers after the decimal point, to obtain the slight rotation.
The used values can be seen in the code below.

Code: Select all

<placement idx="0" position="1.9243,0.0426,1.9041" look_at="0.0314,-0.0028,1.0041" lens_focal_length="20" />
Sincerely yours,
Ewout Merckx

Re: Rotate the camera's sight (without interaction)

Posted: Fri May 27, 2016 8:22 pm
by pincy
Hi Ewout,

The bug is fixed in the latest development version. I'll make an official release with a few more fixes as soon as I have a little time.

Cheers,
Carlo