Page 2 of 2

Posted: Thu Dec 11, 2003 9:05 pm
by Spartacus
Well I did it using the same effects I just made a class that has the camera within rather then derived from it, its probably not the most "effeicant" way to do it but it kinda helped lessen the confusion im not very familiar with the useage of namespacing, and deriving objects with namespaceing, yet so this works for now.

Posted: Sun May 02, 2004 2:23 pm
by Bushman
sorry... its me again.. (be carefull: noob-question)

at the moment, i do experiments at the movement-exemple... (i just started to learn how to use irrlicht)

now my small, stupid question:
HOW can i change the FOV? i wont do super-complicated things like zooming in and out... just change the standard-FOV.

now: what i've done: (thats a part of the main-loop, right after initializing the device)

Code: Select all

video::IVideoDriver* driver = device->getVideoDriver();
scene::ISceneManager* smgr = device->getSceneManager();
[b]scene::ICameraSceneNode::setFOV(0.9f);[/b]
if i try to compile that file (i use MSV studio 6) i get that error-message:
error C2352: 'irr::scene::ICameraSceneNode::setFOV' :
illegal call of non-static member function


what's the problem? how can i fix it? (remember: i'm a noob, so plz comment your source-codes)

Posted: Wed May 05, 2004 7:15 am
by Domarius
Is this a C++ syntax misunderstanding?

You need an object of type "ICameraSceneNode" to be instantiated. eg. 'ICameraSceneNode camera = scene.getCamera();' but don't type that, it most likley won't work - it's just my guess. You'll have to examine the scene object in the irrlicht help file for the proper syntax.

Then your command would be:

camera.setFOV(0.9f);

I am most probably slightly wrong with the syntax there, but I think that's the general idea.

Posted: Wed May 05, 2004 10:00 am
by warui
Bushman wrote:(remember: i'm a noob, so plz comment your source-codes)
So how about learning basics of C++ instead of playing around with hard stuff like 3d engine ? Your problem lies in not understending concepts of class and member function. Go and learn. Look for "Thinking in C++" by B. Eckel, it's free e-book.