fps camera problems

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
Malgodur
Posts: 195
Joined: Sun Mar 15, 2009 8:22 pm

fps camera problems

Post by Malgodur »

How can I set irrlicht fps camera with CollisionResponseAnimator to work like cameras in real fps games? I tried setting diffrent values in animator, but camera still act odd, "jump"when i try go forwards while looking up or go back when looking down, sometimes stuck in meshes...
heres my best setting:

Code: Select all

scene::ISceneNodeAnimator* anim = smgr->createCollisionResponseAnimator(selector, camera, core::vector3df(20,50,20),core::vector3df(0,-1500,0),core::vector3df(0,50,0),0.3f);
but it still dont work too well!
seventhtear
Posts: 11
Joined: Sat May 23, 2009 11:39 am
Location: Poland

Post by seventhtear »

I have the same problem. Try change slidingValue, it helps me a little.
DeM0nFiRe
Posts: 117
Joined: Thu Oct 16, 2008 11:59 pm

Post by DeM0nFiRe »

Try checking out the documentation for the ISceneManager::createCameraSceneNodeFPS function:

http://irrlicht.sourceforge.net/docu/cl ... 1398e43af3

As you can see, there is a parameter for "noVerticalMovement". Set that to true and it will keep your camera from bouncing like that.
Malgodur
Posts: 195
Joined: Sun Mar 15, 2009 8:22 pm

Post by Malgodur »

Oh i missed it,i read only doc about nodeanimators, so its fixed

but i got problem with jumping, camera sometimes STICK to celling! Usually when i press key forward.


And another problem! Why the hell camera doesnt work immediately after irrlicht start?!

and that jumping... how can i change frequency of jumping ( i cant edit irreventreciever because jumping is handled somewhere deep into engine), and the modyfing jumpspeed give no effect?
cr33
Posts: 22
Joined: Fri Mar 27, 2009 3:37 pm

Post by cr33 »

Malgodur wrote: and that jumping... how can i change frequency of jumping ( i cant edit irreventreciever because jumping is handled somewhere deep into engine), and the modyfing jumpspeed give no effect?
i dont know but as far as i know, FPS camera is for 'preview' only. So u have to make derived class of IEventReceiver anyway (if ur going to use more keys than arrows and space) and write your own function for jumping, and perhaps moving + gravity.
also here's something about jumping and built in basic 'actions' for camera:
http://irrlicht.sourceforge.net/phpBB2/ ... umping#top
Post Reply