after seeing people go through such complex ways, it makes me wonder if I'm doing something wrong !!
acutally I simply use the tag in the geom.
so it goes something like this.
ballBody = BodyFactory.Instance.CreateCircleBody(radius, mass);
ballBody.Tag = this;
ballGeom = GeomFactory.Instance.CreateCircleGeom(ballBody, radius, 24);
ballGeom.Tag = this;
of course, all classes should inherit from a class that identifies the object type as environment, character or anything else.
And in the OnCollision Handler, I would do something like this
IGameObject obj1 = (IGameObject)geom1.Tag;
IGameObject obj2 = (IGameObject)geom2.Tag;
then compare obj1.ObjectType to the Types that i expect, then cast it again to that Type, & call the corresponding method.
Hope that helps, & I'm not using something that should be avoided.