Inherit from CollisionNode

I’m not sure that I would do it this way, but you could choose this approach.

Note that if you inherit from CollisionNode, you also inherit from ReferenceCount, and you thus inherit all of the rules that go along with this. In particular, you can’t do:

MyObject myObject; 

And you must instead do:

PT(MyObject) myObject = new MyObject; 

You are also inheriting from TypedObject which means you should probably also follow Panda’s TypedObject convention, which means defining get_class_type(), init_type(), get_type(), and force_init_type(), as you see virtually every Panda class doing. Also ensure that you call your own class’s init_type() method sometime at startup (as Panda generally does in the config_blah.cxx file).

David