OgreODE Collision Listener and Ogre::UserDefinedObject

Problems building or running the engine, queries about how to use features etc.
Post Reply
User avatar
Robomaniac
Hobgoblin
Posts: 508
Joined: Tue Feb 03, 2004 6:39 am

OgreODE Collision Listener and Ogre::UserDefinedObject

Post 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
phear hingo

My Webpage
ksangho77
Gnoblar
Posts: 6
Joined: Wed Dec 15, 2004 2:32 am

Post by ksangho77 »

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67
Contact:

Post by sinbad »

getTypeName () is defined virtual in UserDefinedObject so there's no reason why this shouldn't work if you overrode it correctly.
Post Reply