This patch adds two parameters to the functions in the collisionCallbacks list. The callback function should thus be like this:
def on_colliding(other, point, normal):
print("Colliding with %s at %s with normal %s" % (other, point, normal))
game_ob.collisionCallbacks.append(on_colliding)The point parameter will contain the collision point in world coordinates on the current object, and the normal contains the surface normal at the collision point.
An alternative would be to pass a list of all collision points to the callback, rather than just the first one. I could implement this, if it is deemed much better -- the current implementation suits my needs.
Due to the change in the arity of the callback function, this patch constitutes an API-breaking change. We could try to use introspection to find out whether the new parameters will be accepted or not. However, this will cost CPU time, and may not always work (for example when the callback is routed through functools.partial or other function with a variable nr of arguments).