I need to setup a scenenode with a listener but I am not sure on how to go about doing that. There aren't any events (like framestarted for the framelistener class) for the Scenenode class.
Is there an example anywhere on how to use the SceneNode.setlistener function
Any help would be GREATLY appreciated!
I am using VS 2008 and C#.
An Example in C# or C++ would be very helpful!
i think u can try it in this way:
class MyNodeListener : Node.Listener
public override void NodeAttached(Node param1)
public override void NodeDestroyed(Node param1)
public override void NodeDetached(Node param1)
public override void NodeUpdated(Node param1)
And using of that :
//Instanciate new object
MyNodeListener mnl = new MyNodeListener();
That should it be
No guarantee that it works, never used that by myself
Thanks for the reply bostich!
decending from the node.listener was the only way I could think of to get it to work.. but I wanted to be sure! I searched all the forums (both ogre and mogre) for an example and couldn't find one.. (even in the src code for both).
I'll give it a try!
again many thanks!
That works great bostich!
I'm also going to do the same for MovableObject.Listener and once done I'll post code up here just in case someone else needs an example on using listeners with nodes/movableobjects.
<bows to bostich>