Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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

1 Answer 1

Very good tutorial here for character creation:

Part 1: http://www.youtube.com/watch?v=DBdpIDGXEPU

Part 2: http://www.youtube.com/watch?v=oTI1A_FzOB8

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 bpy.data.objects["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

 
discard

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.