Collisions against an inverted CollisionSphere

Hi everyone

I was just wondering if there is some way to check collisions against an inverted sphere (that is checking whether you’re still inside and all that)?

I thought about just using the events generated by collisions ‘-into’ and ‘-outof’ reversed (that is using ‘-into’ as ‘-outof’) but I need information on how long outside the sphere the player has gone, and I am not sure this information is accesble in this scheme.

Can anyone help me?

Best regards

Try creating a CollisionInvSphere object instead of a CollisionSphere. This is just like a CollisionSphere, but the “solid” part is on the outside.


Hi David

Thank you, did I miss something in the reference or have this class not been commented yet?

Guess that documenting every class must be a lot of work, so who can blame the guys doing this thing for not getting around to it.

Best regards (and thanx again)

The real problem is this… the class-ref documentation is about four months old. It was generated by a program called “epydoc,” but because of changes in panda, epydoc isn’t compatible with panda any more. Which means I can’t regenerate the documentation. As I understand it, Jason Pratt is working on fixing panda so that epydoc will work correctly. When he finishes, I’ll update the documentation.

  • Josh