Camera without perspective

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
BillyCallahan
Posts: 26
Joined: Fri Jun 19, 2015 6:51 am

Camera without perspective

Post 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 ?
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Camera without perspective

Post by CuteAlien »

Matrix4 has a function buildProjectionMatrixOrthoLH. You pass that to the camera with ICameraSceneNode::setProjectionMatrix and set the isOrthogonal parameter to true.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
BillyCallahan
Posts: 26
Joined: Fri Jun 19, 2015 6:51 am

Re: Camera without perspective

Post by BillyCallahan »

Thank you :)

I couldn't find the setOrthogonal(true), any ideas ?
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Camera without perspective

Post 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.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
BillyCallahan
Posts: 26
Joined: Fri Jun 19, 2015 6:51 am

Re: Camera without perspective

Post by BillyCallahan »

Hello,

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