Camera Help

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
Kerisaki
Posts: 2
Joined: Fri Feb 19, 2010 3:11 am

Camera Help

Post by Kerisaki »

Hey guys, I've just started Irrlicht and so far I seem to understand the most part, but in the Hello World Tutorial, using vector3df for a camera, but I dunno how it works, it uses x, y, z for the parameters but the second time what does it do?

Code: Select all

smgr->addCameraSceneNode(0, vector3df(0,30,-40), vector3df(0,5,0));
And how does he know where to set the camera? I loaded a .3ds model and it is completely off the middle... any help would be appreicated thanks!
Lonesome Ducky
Competition winner
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Post by Lonesome Ducky »

Um, perhaps you should use a compiler that helps with code completion? That second vector is either the target or rotation, and an ide with code completion would show you that. And as for the model, move the camera far enough away that it actually fits in the screen, then set the camera's target to it's position
nathanf534
Posts: 199
Joined: Tue Dec 09, 2008 2:55 am

Post by nathanf534 »

the first vector is the position of the camera (x,y,z) and the second vector is where the camera is looking at (x,y,z)
while(signatureEmpty){cout<<wittyComment();}
slavik262
Posts: 753
Joined: Sun Nov 22, 2009 9:25 pm
Location: Wisconsin, USA

Post by slavik262 »

The best solution is usually to RTM :wink:

There's also a copy in your download of Irrlicht in the "doc" directory.
Kerisaki
Posts: 2
Joined: Fri Feb 19, 2010 3:11 am

Post by Kerisaki »

Oh thanks everyone for your time, it really helped
jimburnettva
Posts: 13
Joined: Fri Feb 19, 2010 5:07 pm
Contact:

Post by jimburnettva »

I wondered the same thing. KDevelop has code completion and so does Visual C++ express 2005/2008.

Second Vector3df is where the camera is pointing....I think... :-)
Post Reply