Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to write a Python function for Blender(2.66) game engine, that permits me to detect collision between two objects.

I tried to read the documentation, but it's very confusing, and I don't understand it.

Someone have an example how to do it?

share|improve this question

Very good tutorial here for character creation:

Part 1:

Part 2:

Part two at 12:40 the lesson moves to collisions.

I am not a python expert but when you hover over any buttons in blender it shows the name of the python reference for it. When I tested a collision sensor it popped up with

Python: CollisionSensor.type["Cube"]

bpy is blender python the blender related code package.

There is also an interactive python display above the info panel (cant remember if it was introduced in the 2.6 series or not) which shows the python code which would do whatever activity you just did with the GUI.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.