Panda PhysX

This means that your actor has been removed already by someone else, and thus _error_type is no longer “ET_OK”. This could be

  • because you have called remove() on another reference of this PhysActor
  • you have called remove() on the scene that owns the actor. All actors get automatically invalidated this way.
  • the actor has been automatically created by an controller, and you removed the controller. The automatically created objects get invalidated also.

This is exactly the same behaviour your have implemented in PandaNode (I admit that I have been cheating here - to make PhysX usage the same as core Panda3D usage).

I will add a “getErrorType” method to all objects for the next release. Then you could check before you try to remove. I have wondered for a long time if I should swallow this error and just return if the actor is already removed, but I think this leads to sloppy programming. It’s better to see that something has gone wrong. But this is a rather philosophical question, and good reasons exist for both ways.

enn0x