PDA

View Full Version : picked objects


Jerry
12-12-2005, 02:06 PM
When pick() returns a valid object,
is there some way to determine
which object was picked?

farshizzo
12-12-2005, 02:26 PM
Hi Jerry,

If you want to know which object was picked, then compare it with the object. Example:picked = viz.pick()
if picked == box:
print 'box was picked'
elif picked in (ball1,ball2,ball3):
print 'one of the balls was picked'