How to working with two different 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!
Post Reply
bapi
Posts: 33
Joined: Fri Apr 04, 2008 1:57 pm
Location: India
Contact:

How to working with two different camera-?

Post by bapi »

I m using FPS camera for moving in my game map and it works fine. Now i need to add another fixed camera at fix point in map. So when the user press 'u' key in keyboard, it will show that map from the fix camera. How can i do this?
asparagusx
Posts: 81
Joined: Thu Oct 16, 2008 6:50 am

Post by asparagusx »

There is a function setActiveCamera (ISceneManager::setActiveCamera), which takes as a parameter the camera to use (make active). You would define another camera (using addCameraSceneNode) and then set that active using the setActiveCamera call when the user presses 'u'.

Anton
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

The meshviewer does something similar, by selecting the camera from the menu. The RTT tutorial uses two cameras to navigate through the scene, but still get the RTT captured from the same place all the time.
bapi
Posts: 33
Joined: Fri Apr 04, 2008 1:57 pm
Location: India
Contact:

Post by bapi »

I also found the technic in said tutorial. Any way thank for u reply.
Post Reply