FPS camera doesn't work

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
Jake007
Posts: 16
Joined: Wed Jun 29, 2011 8:39 pm
Location: Slovenia

FPS camera doesn't work

Post by Jake007 »

Hi!

addCameraSceneNodeFPS() doesn't work. I have tried examples from various tutorials but nothing. I have tried with Maya camera but same problem. If I try to open project from examples directory and compiling it, it works.
I create my device with createDeviceEx and I also tried with createDevice, but with same result.
I threw out all unnecessary code. Is there maybe any parameter that can enable or disable this and I missed it?
I also noticed that cmd doesn't display display information on which files have been loaded etc...
Is there a way to fix this without creating a new project and hoping it will work?

If you need any additional information please let me know.

Regards,
Jake
Radikalizm
Posts: 1215
Joined: Tue Jan 09, 2007 7:03 pm
Location: Leuven, Belgium

Re: FPS camera doesn't work

Post by Radikalizm »

We can't help you out without seeing any code at all ;)
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Re: FPS camera doesn't work

Post by serengeor »

@Jake007: My old computer doesn't work too, maybe you know whats wrong with it?
I'm sure you get some errors that might help us out helping you!
Working on game: Marrbles (Currently stopped).
Jake007
Posts: 16
Joined: Wed Jun 29, 2011 8:39 pm
Location: Slovenia

Re: FPS camera doesn't work

Post by Jake007 »

I don't get any errors at all. It renders everything ok, receiver also works, so it gets control over mouse.

This is the code I used ( and 20 other versions):

Code: Select all

smgr->addCameraSceneNodeFPS();
device->getCursorControl()->setVisible(false);
HerrAlmanack
Posts: 52
Joined: Mon Jun 13, 2011 3:50 pm

Re: FPS camera doesn't work

Post by HerrAlmanack »

is there any scenery at all that can help you get a point of reference...

also, when you include code the PROPER way to do it would be to include ALL THE CODE that REPRODUCES the problem.

those two lines really aren't much help at all.
Jake007
Posts: 16
Joined: Wed Jun 29, 2011 8:39 pm
Location: Slovenia

Re: FPS camera doesn't work

Post by Jake007 »

I found where the problem is. But I don't know why. As soon as I removed &receiver from device creation parameters it worked. I'm using slightly modified version of mast event receiver.
Does anyone maybe know why?
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Re: FPS camera doesn't work

Post by serengeor »

I think I know.
It returns true somewhere and the camera doesn't receive events that control it.
Working on game: Marrbles (Currently stopped).
Radikalizm
Posts: 1215
Joined: Tue Jan 09, 2007 7:03 pm
Location: Leuven, Belgium

Re: FPS camera doesn't work

Post by Radikalizm »

Jake007 wrote:I found where the problem is. But I don't know why. As soon as I removed &receiver from device creation parameters it worked. I'm using slightly modified version of mast event receiver.
Does anyone maybe know why?
You have to keep in mind that the provided FPS and Maya cams are used for debugging and example purposes, not for use in actual polished products
I assume that the camera is not getting any events any more because you set your own event receiver which already handles the event
You'll have to write a custom camera class with the functionality you need for your project eventually
Jake007
Posts: 16
Joined: Wed Jun 29, 2011 8:39 pm
Location: Slovenia

Re: FPS camera doesn't work

Post by Jake007 »

@serengeor
You were right :). There was one return statement too much.

@Radikalizm
I am using it only for test purposes. My camera class is half done. But until then FPS camera will do.

With that problem solved also cmd logs started working. Thank you all for your help.

Regards,
Jake
Post Reply