Page 1 of 1
ICameraSceneNode::setInputReceiverEnabled() - not working[?]
Posted: Mon Aug 14, 2006 3:54 am
by Miik3h
Hi,
I don't know if this is a bug, or I might be doing something wrong... but I have created a FPS camera and then used
irrCamera->setInputReceiverEnabled(false);
But it doesn't seem to do anything, I can still control the camera with my keyboard and mouse. The only way I managed to lose control of the camera is to create it like this
Code: Select all
// add a FPS camera with rotate and move speed set to 0.0f
irrCamera = irrSceneMgr->addCameraSceneNodeFPS(0, 0.0f, 0.0f);
This works, but I have a feeling it might be stuffing up my 'custom' controller (that uses setRotation function).
Advice welcome.
Posted: Tue Aug 15, 2006 7:48 am
by charlie
There is no problem in the method.
I have used it many times .
May be there is something wrong with you programme.
Posted: Tue Aug 15, 2006 1:53 pm
by Halan
maybe we can help you if you copy the whole intializing of the camera not only one line
grteets,
halan
Posted: Wed Aug 16, 2006 2:00 am
by Miik3h
This is all my code to initialize the camera.
Code: Select all
// In the header (.h) file
IrrlichtDevice* irrDevice;
IVideoDriver* irrVideoDriver;
ISceneManager* irrSceneMgr;
IGUIEnvironment* irrGUIEnv;
ICameraSceneNode* irrCamera;
Code: Select all
// In the (.cpp) file
irrDevice = createDevice(EDT_OPENGL, dimension2d<s32>(1024, 768), 16, false, true, this);
irrVideoDriver = irrDevice->getVideoDriver();
irrSceneMgr = irrDevice->getSceneManager();
irrGUIEnv = irrDevice->getGUIEnvironment();
// add a FPS camera with rotate and move speed set to 0.0f
irrCamera = irrSceneMgr->addCameraSceneNodeFPS(0, 0.0f, 0.0f);
irrCamera->setPosition(vector3df(0, 50, 0));
irrCamera->setInputReceiverEnabled(false);
Thats all really, although I have other code that indirectly modifies the camera.
Code: Select all
irrCamera = irrDevice->getSceneManager()->getActiveCamera();
NewtonBodySetUserData(nBody, irrCamera);
Then I try and move & rotate the camera through Newton callbacks ect.
At the moment I am not doing much with newton callbacks so I don't think it should make much difference.
Posted: Wed Aug 16, 2006 2:12 am
by Miik3h
What I am working on is largely based on the Newton Integration Tutorial
http://irrlicht.sourceforge.net/tut_newton.html
I have organised it as best I can into Classes with header files ect.
I am trying to go one step further then the tutorial by adding collision detection between the camera and the world. I thought it was going to be easy enough but I am quite lost at the moment.
I will post my code so far if someone agrees to help me (has knowledge in Newton

). I am using DevC++.