Third Person Camera troubles

pepote

16-04-2006 12:14:51

Hi, I'm rewriting to c# the code for Third Person Camera in http://www.ogre3d.org/wiki/index.php/3r ... m_tutorial


And I have a lot of troubles because OgreDotNet hasn't ExampleFrameListener class like yes ExampleApplication class.

I read all code from ExampleFrameListener and I think is more difficoult to me rewrite it now.

Some with experience can help me?

Kencho

16-04-2006 23:06:17

Tranquilo, porque la parte complicada de ExampleFrameListener es el tema de captura de teclado y ratón, y lo necesario está redefinido. Sencillamente, te vas a perder el poder mover libremente la cámara, cambiar la forma de renderizar los modelos (sólido, wireframe...), tipo de anisotropía, y mostrar las frames por segundo (en Ogre.log se guardan las fps media, máxima y mínima). En esa demo creo que no se podía hacer nada de eso, porque frameStarted no llama a la versión de ExampleFrameListener para nada si no recuerdo mal. Como puedes ver, no es mucho problema.

Tienes que eliminar lo siguiente:
- El nuevo FrameListener no hereda de nada (ni de ExampleFrameListener)
- No recibe parámetros en el constructor

Con eso debería funcionar sin problemas ;)

English version below:
Don't worry, as the hard part of ExampleFrameListener is the input capture and all the needed is redefined.
All you're going to lose is free camera flight, rasterization mode (solid, wireframe), anisotropy mode, and show the fps (in Ogre.log is stored the final value of all average, maximum and minimum). In this demo all of this is missing, as ExampleFrameListener::frameStarted isn't ever called if I recall correctly. As you can see, it's not a big problem.

What you have to do:
- The new FrameListener doesn't inherit from anything (even from ExampleFrameListener)
- The constructor doesn't get any parameters

Then it should work fine ;)