Hey everyone. I needed to access the group and mask data for KX_GameObject collision data, so I exposed it to the API:
Feel free to test it and tell me what you think.
It accepts a bitmask as the new collision mask / group. I’ve written a wrapper for that purpose which I can include in the resources forum, although it’s simple binary so not too hard.
- KX_GameObject.collisionMask - the collision mask of the object
- KX_GameObject.collisionGroup - the collision group of the object
For those who don’t know what this might be used for; I’m using it to disable enemy collisions upon death. You cannot use replaceMesh with physics types other than triangleMesh on the source object, and thus I am using this patch to enable me to set the enemy to no collision (by setting either the mask or group to 0)