Zooming camera?
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.
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)
if i try to compile that file (i use MSV studio 6) i get that error-message:
what's the problem? how can i fix it? (remember: i'm a noob, so plz comment your source-codes)
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]
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)
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.
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.
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.Bushman wrote:(remember: i'm a noob, so plz comment your source-codes)
Tomasz Nowakowski
Openoko - www.openoko.pl
Openoko - www.openoko.pl