Page 1 of 1

OgreODE Collision Listener and Ogre::UserDefinedObject

Posted: Tue Feb 01, 2005 2:05 am
by Robomaniac
I'm trying to get callbacks to my entities working on collision, so I can have item pickups and bullet explosions and stuff like that. I've set up and OgreOde::CollisionListener class, which calls back to collision, and it goes into this class fine. However, my Ogre::UserDefinedObject::getTypeName always returns "Undefined" unless I cast it to the certain class which i have extended (which is bad, as I need the type name to know which class to cast it to :S)

Anyways, is there a way around this easily?

Thanks

[ps/edit]
I might just use OgreOde::Body::getUserType (or whatever) instead of getUserObject

hm...

Thanks again

[pps/edit edit]
I'm also having trouble with collision callbacks only returning one valid geometry from the contact. Is this a know bug?

Thansk

Posted: Tue Feb 01, 2005 3:28 am
by ksangho77

Posted: Tue Feb 01, 2005 2:56 pm
by sinbad
getTypeName () is defined virtual in UserDefinedObject so there's no reason why this shouldn't work if you overrode it correctly.