Actor pointing back to container class ?

fassihi

06-05-2008 18:13:00

Would it be possible for the actor to point to another object that might contain it?

When I find out the actor that collides in the scene, I would like to know to which game object it belongs. The game object is containing the NxOgre::Actor class.

Any ideas how this can be done?

betajaen

06-05-2008 18:31:03

By [b]inheriting[/b] (ignore the second part of the article), and make your Body have a pointer to your game object. If you use a separate HashIdentifier for your Actor, you can tell them apart in the Container.

fassihi

07-05-2008 15:05:13

Thanks a lot!