ICameraSceneNode::setInputReceiverEnabled() - not working[?]

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Miik3h
Posts: 9
Joined: Mon Oct 17, 2005 1:08 am
Location: Australia

ICameraSceneNode::setInputReceiverEnabled() - not working[?]

Post 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.
charlie
Posts: 10
Joined: Tue Aug 15, 2006 4:11 am

Post by charlie »

There is no problem in the method.
I have used it many times .
May be there is something wrong with you programme.
Student
Halan
Posts: 447
Joined: Tue Oct 04, 2005 8:17 pm
Location: Germany, Freak City
Contact:

Post by Halan »

maybe we can help you if you copy the whole intializing of the camera not only one line ;)

grteets,
halan
Miik3h
Posts: 9
Joined: Mon Oct 17, 2005 1:08 am
Location: Australia

Post 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.
Miik3h
Posts: 9
Joined: Mon Oct 17, 2005 1:08 am
Location: Australia

Post 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 :roll: ). I am using DevC++.
Post Reply