Why is my FPS camera a little strange?
Why is my FPS camera a little strange?
When I move my mouse , the all picture rotates strangely.The camera rotation method doesnot like the Counter-Striker game.
My irrlicht version is 1.7 running on Ubuntu14 with Qt.
My irrlicht version is 1.7 running on Ubuntu14 with Qt.
Re: Why is my FPS camera a little strange?
It looks like all the picture rotates around the center of the screen.
Re: Why is my FPS camera a little strange?
Sorry, as long as we don't know what exactly you have coded we can't help much. Also problem description is a little confusing - maybe you can do quick video-recording?
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: Why is my FPS camera a little strange?
Maybe set the "target"? Shouldn't be the same as "position". May not be needed but could also set the "up" vector.
Re: Why is my FPS camera a little strange?
I think in common situation , if you move your mouse to left direction , you will look the left side , but on my screen , the scene rotates around the center of the screen.
I use codes follows to create a fps camera.
ICameraSceneNode* fps_camera = smgr->addCameraSceneNodeFPS();
My irrlicht version is 1.7 running on Ubuntu14 with Qt.
I use codes follows to create a fps camera.
ICameraSceneNode* fps_camera = smgr->addCameraSceneNodeFPS();
My irrlicht version is 1.7 running on Ubuntu14 with Qt.
Re: Why is my FPS camera a little strange?
You need to set the position and target. For example,
Code: Select all
fps_camera->setTarget(core::vector3df(0, 90, 0));
fps_camera->setPosition(core::vector3df(-300, 90, 0));
Re: Why is my FPS camera a little strange?
Target is probably not necessary for fps-camera.
But I have no experience in mixing with Qt, so I don't have any examples for that yet unfortunately.
But I have no experience in mixing with Qt, so I don't have any examples for that yet unfortunately.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: Why is my FPS camera a little strange?
Any cpp files using the fps camera is ok,thx.
Am i wrongly using the fpscamera ? I only write the ICameraSceneNode* fps_camera = smgr->addCameraSceneNodeFPS();
Am i wrongly using the fpscamera ? I only write the ICameraSceneNode* fps_camera = smgr->addCameraSceneNodeFPS();
Re: Why is my FPS camera a little strange?
Try setting a position as mentioned above - does that change anything?
Otherwise it's probably the combination with Qt, but I don't know how you do that.
Otherwise it's probably the combination with Qt, but I don't know how you do that.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: Why is my FPS camera a little strange?
OhOhOhOh!!!Maybe because the Operating system.
Without QT,I just open the the example2 in /irrlicht/bin/Linux is the same on Ubuntu14 . But when I run the example2 in /irrlicht/bin/win64/ on windows all the move of the mouse is well!
Why?Does the Ubuntu mouse event handling go wrong ? But Irrlicht supports Linux , I am confused.
Without QT,I just open the the example2 in /irrlicht/bin/Linux is the same on Ubuntu14 . But when I run the example2 in /irrlicht/bin/win64/ on windows all the move of the mouse is well!
Why?Does the Ubuntu mouse event handling go wrong ? But Irrlicht supports Linux , I am confused.
Re: Why is my FPS camera a little strange?
I just tried 1.7 on Ubuntu 14.04 and can't reproduce it. But I compiled Irrlicht myself, maybe official packages do something different (we do not release those - and I have no idea who does...). You could try using a current Irrlicht version instead (from zip on the homepage or from svn), maybe that works.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: Why is my FPS camera a little strange?
I think it is how the mouse coords are reported. They should be relative to the window but in this case they are probably reported relative to the screen. I remember having this problem with VirtualBox some time ago.