Zooming camera?

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Spartacus
Posts: 70
Joined: Fri Nov 21, 2003 11:56 pm

Post 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.
Bushman

Post 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)
Domarius
Posts: 178
Joined: Thu Mar 11, 2004 9:51 am
Location: Brisbane, QLD, Australia

Post 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.
warui
Posts: 232
Joined: Wed Apr 14, 2004 12:06 pm
Location: Lodz, Poland
Contact:

Post 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.
Tomasz Nowakowski
Openoko - www.openoko.pl
Post Reply