Page 1 of 1

Camera without perspective

Posted: Thu Jul 23, 2015 9:59 am
by BillyCallahan
Hello,
I know this question has been asked many times but I can't make it through...
I've a camera and I'm trying to disable the perspective, but i know nothing about matrix.
Here's how my current camera displays a cube which faces me:
Image

I'd like to remove all perspective, to have a 'real' cube. Is it possible ?

Re: Camera without perspective

Posted: Thu Jul 23, 2015 12:18 pm
by CuteAlien
Matrix4 has a function buildProjectionMatrixOrthoLH. You pass that to the camera with ICameraSceneNode::setProjectionMatrix and set the isOrthogonal parameter to true.

Re: Camera without perspective

Posted: Thu Jul 23, 2015 2:52 pm
by BillyCallahan
Thank you :)

I couldn't find the setOrthogonal(true), any ideas ?

Re: Camera without perspective

Posted: Thu Jul 23, 2015 8:11 pm
by CuteAlien
Yes, use ICameraSceneNode::setProjectionMatrix which has that parameter.
You can't just have a flag for it because you need to describe the area to project with a matrix.

Re: Camera without perspective

Posted: Thu Jul 30, 2015 1:05 pm
by BillyCallahan
Hello,

Sorry for the delay I had somethings to fix.
Thank you for helping me, once again :roll:
BIlly !