ControllerFunction in Mogre

codo

04-11-2007 22:56:20

I was wandering how to use ControllerFunction functionality in MOGRE described here:
http://artis.imag.fr/~Xavier.Decoret/resources/ogre/tutorial3.html&hl=en&ct=clnk&cd=1&client=firefox-a">http://64.233.183.104/search?q=cache:Ni ... =firefox-a

Any ideas?

bleubleu

05-11-2007 00:29:01

Hi!

I am not familiar with these classes, but I believe most of them (Controller, ControllerManager, etc.) have been excluded from Mogre for some reason... Probably because it uses templates.

Mat

codo

05-11-2007 21:42:48

Ok, so how to implement such functionality? I'd like to animate the rotation of the object with wave-like function (sin/cos). Do I have to do
entity.rotate(Vector3.X_UNIT, this->calculateRotation(evt.timeSinceLastFrame)); ???

bleubleu

06-11-2007 00:11:31

Hi there!

First. If your goal is simply to move an object around. You dont need Controllers AT ALL. Simply recompute you sin/cos at each time step in your frame listener (FrameStarted/Ended) and move the object around.

If you REALLY want to use the controller thing, there is something you can do about it, without even touching the Mogre source. Create yourself a Managed C++ project and you will be able to access the Ogre C++ AND your C# project.

For an example on how this works, look at the PLSM2Helper project in the Mogre SVN. It has nothing to do with what you are doing, but it is a neat example on how to make this kind of thing work.

Mat

codo

06-11-2007 14:06:35

Thanks a lot for your reply.