Emulate CameraSceneNodeFPS mouse look using CameraSceneNode?
Emulate CameraSceneNodeFPS mouse look using CameraSceneNode?
It seems this was asked before in some form, but searching other related topics I can't find a clear answer and maybe this one is a specific case so I would like to find out how do you emulate the mouse look feature of AddCameraSceneNodeFPS with just using the AddCameraSceneNode?
Re: Emulate CameraSceneNodeFPS mouse look using CameraSceneN
If you check the code of source/Irrlicht/CSceneNodeAnimatorCameraFPS.cpp/.h then you can see how the camera is animated for the FPS camera. Copy out the parts you need and add your own animator to the camera. Note that you can also disable input or even remove animators - then the fps-camera gets back to being a normal camera.
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: Emulate CameraSceneNodeFPS mouse look using CameraSceneN
Thanks CuteAlien, I think I'll do some experimentation with this one since I was just testing some old snippet that I need which uses this setup (actually it uses mouse velocity to turn and respond). I also did a bit of searching and found out that it is sort of a struggle to get this to work with Irrlicht even for bigger projects.. https://github.com/minetest/minetest/issues/3756CuteAlien wrote:If you check the code of source/Irrlicht/CSceneNodeAnimatorCameraFPS.cpp/.h then you can see how the camera is animated for the FPS camera. Copy out the parts you need and add your own animator to the camera. Note that you can also disable input or even remove animators - then the fps-camera gets back to being a normal camera.