BGE: Adding a Python collision API. The initial patch was provided by agoose77, with some edits by me.

KX_GameObject now has a collisionCallbacks list which is a list of callables that are called when a collision occurs. The callables will be called with an argument that contains a reference to the other object involved in the collision (i.e., not self).
This commit is contained in:
2013-09-14 02:02:58 +00:00
parent 9f87d9963e
commit 6365678109
4 changed files with 196 additions and 33 deletions

View File

@@ -134,6 +134,12 @@ base class --- :class:`SCA_IObject`
:type: :class:`KX_GameObject` or None
.. attribute:: collisionCallbacks
A list of callables to be run when a collision occurs.
:type: list
.. attribute:: scene
The object's scene. (read-only).