Documentation

I don’t think the documentation makes it clear enough that you can use CollisionHandlerPusher and CollisionHandlerPhysics like CollisionHandlerEvent. There needs to be a line that explicitly says that the functionality of CollisionHandlerEvent is in those two other handlers.

Side question: Am I discussing the documentation in the right place?

Just check the class definition in the Python Ref if you want to see a class’s inheritance scheme. In this case it clearly shows that CollisionHandlerPusher and CollisionHandlerPhysical are derived from CollisionHandlerEvent.

http://www.panda3d.org/reference/1.8.1/python/classpanda3d.core.CollisionHandler.php

You’re missing the point, it should explitly state this stuff for people who will be learning it in the future.

@cslos77: I’ll note that PhysicsCollisionHandler does not appear to be represented there, and its own page seems to leave out its inheritance; one could guess from what is shown that it’s likely that PhysicsCollisionHandler also inherits from CollisionHandlerEvent, but given the difference in nomenclature the thought might not occur to some.

In any case, given the potential power of this inheritance, and the fact (if I’m not much mistaken) that the system doesn’t allow one to use multiple handlers for a given collision solid, it seems like a good idea to make a point of noting this in the manual somewhere, perhaps as as short section (with its own heading) on the “Collision Handlers” page.

Hi Thaumaturge, Big Wig wrote “CollisionHandlerPhysics” which I took as CollisionHandlerPhysical. But for the CollisionHandlerPusher, at least, the ref page definitely shows the relation to CollisionHandlerEvent, and the manual states:

Admittedly the PhysicsCollisionHandler section could be clearer about its relation to the Pusher, but the real issue is its absence from the collision hierarchy in the class ref, maybe it’s newer than the others or something…?

Fair enough; I took it to refer to “PhysicsCollisionHandler” because I happened to have posted in the thread that I think gave rise to this one, I think.

(The name “PhysicsCollisionHandler” is, I do think, one that’s likely to spawn such mistakes: very similar to the name of another class, and breaking the nomenclature of the other classes in its group.)

True, but I do think that it might be a good idea to give the relationship a small section of its own – it’s quite a useful tidbit, and thus something that I think is worth giving a little prominence.

I don’t know; the class being new might explain its absence from the heirarchies of its parents, but I wouldn’t expect that to result in the lack of a heirarchy on PhysicsCollisionHandler’s own page. I think that I’ve read about errors with the tool that produces the class reference – perhaps this is something like that?