I'm implementing a Python API for the collision masks in the Blender Game Engine, and I've run into a snag.
Whenever I change the collision group/mask, I call a Refresh function which invokes this code:
Code: Select all
// Refresh collision controller
GetPhysicsEnvironment()->RefreshCcdPhysicsController(this);
// Ensure the object isn't sleeping to ensure collisions are possible
GetRigidBody()->activate();
Long story short, this code works, unless the object is already colliding, such as resting on a floor plane, in which case it remains stuck.
Another issue I have noticed is that taking the total force from collision contact points doesn't seem to add to a sensible number. Any ideas here?