PDA

View Full Version : e.obj2 in collisions


Andrey
07-10-2008, 08:45 AM
Hello,

There is a set of objects described as a list with the members which are direct instances of a class. These objects are e.obj2 in collisions. Could you recommend how to register the collision with certain object by means of its class variable?

Thank you,
Andrey

farshizzo
07-10-2008, 11:24 AM
Sorry, I don't understand what you are trying to do. Can you be more specific?

Andrey
07-10-2008, 01:12 PM
Sorry for the puzzle. So I have a number of objects (balls) described in the script as the list segmSet[]. Each object was generated as the instance of class. While colliding with a hand moving pointer object (which is e.obj1) such a ball (which is e.obj2) should change the color to orange and class variable segmSet[].selected associated with this object should be changed. No problem with color:

e.obj2.color(viz.ORANGE)

but if I try something like

if e.obj2 in segmSet:
. . .

to change segmSet[].selected, it does not work.

farshizzo
07-10-2008, 06:54 PM
It's still not clear what the problem is. Can you post a small sample script that recreates the problem you are having so that I can run it here?