Camera re-initialization : ISSUE RESOLVED (hack)

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
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Camera re-initialization : ISSUE RESOLVED (hack)

Post by keless »

I still have the above texture problem, but I also have a new camera problem. The theme of my posts seem to be "Errors when re-creating IrrLicht objects":

I have an FPS camera and a .3ds room. When I create gs_Main, it sets up the room and the camera. By default it sets the camera's InputReceiver to FALSE. I then have my onEvent look for key 'C' which toggles the camera's InputReciever.

This actually works, the first time I am in gs_Main... If I go back to gs_Intro (thereby calling the destructor on gs_Main, which remove()s the scene node, but does NOT drop() the mesh or camera), then re-enter gs_Main---

the camera displays the scene, but pressing 'C' no longer works to turn on its event receiver. It wont accept events anymore!
Last edited by keless on Thu Jan 22, 2004 4:19 am, edited 1 time in total.
a screen cap is worth 0x100000 DWORDS
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

hrm, if I put "m_smgr->setActiveCamera(m_cam);" after my camera creation, the event reciever starts working--- which means obviously that while the first time I create this camera, it is automatically set as active, but that the following times it is not.

This makes me worry that the camera is not actually unloaded when I stop using it (and I cant use drop() on it, either). This doesnt seem right, but for now, I've just left setActiveCamera() in as a hack to make IrrLicht work for me.
a screen cap is worth 0x100000 DWORDS
Post Reply