Hi all,
I'm a new Irrlicht user, I'm working on a project for virtual reality room, actually I'm writting a program with Irrlicht to generate a stereoscopic view (2 cam positionning as the eyes).
I'd like to know if it's possible to make 2 differents cameras (FPS) to have the same behavior (event) from the user.
Your help will be very helpfull
PS: sorry for my bad english
Giving same keyboard/mouse event to 2 FPS cam different
Add to the forward text
I forgot to say that I'm coding a function based on an exemple found in this forum
Create a custom eventReceiver:
then
Create 2 cameras with a splitting screen
the problem is: it's only work for mouse event and it don't work well (when I turn around, one camera is late comparing to the other
Can anybody help me???
Thanks
Create a custom eventReceiver:
Code: Select all
class MyEventReceiver : public IEventReceiver {
public:
virtual bool OnEvent(SEvent event) {
//Key S enables/disables SplitScreen
if (event.KeyInput.Key == KEY_KEY_S && event.KeyInput.PressedDown) {
SplitScreen = !SplitScreen;
return true;
}
camera[3]->OnEvent(event);
camera[2]->OnEvent(event);
return false;
}
};Create 2 cameras with a splitting screen
Code: Select all
smgr->setActiveCamera(camera[2]);
driver->setViewPort(rect<s32>(0,0,ResX/2,ResY));
smgr->drawAll();
smgr->setActiveCamera(camera[3]);
driver->setViewPort(rect<s32>(ResX/2,0,ResX,ResY));
smgr->drawAll();
Can anybody help me???
Thanks
.: Franck :.
-
Guest
-
Guest