When I have a FPS camera, I can use the mouse to rotate the camera and look at my target. It feels very smooth. But on a system that has no mouse, I'd like to handle camera rotation with keys.
I got a few questions here:
1) I can catch my key event, and try to compute the rotation. Ok, my math is a bit rusty now, but it does not feel as smooth as the built-in mouse-based rotation. Is there any simple code snippet I can learn from? I remember to see a FPS rotation code snippet posted by someone here, but when I want to look it up now, I just couldn't find it.
2) In order to learn from the engine, I look into this method:
Code: Select all
void CSceneNodeAnimatorCameraFPS::animateNode(ISceneNode* node, u32 timeMs)
3) Let's say I got key-based rotation as smooth as I want now, but everything seems to be mouse-based in Irrlicht. But on Android, there's no mouse. Is there an easy way to replace mouse movement with key presses? Or, do I have to re-do event handling in every class to replace mouse movement?
Thanks for any hint.
Paul
[/code]