Hey everyone. I needed to access the group and mask data for KX_GameObject collision data, so I exposed it to the API:
http://projects.blender.org/tracker/index.php?func=detail&aid=33710&group_id=9&atid=127
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.
attributes:
- 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)