View Single Post
  #10  
Old 05-04-2006, 11:07 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

In python, you can add as many attributes to an object as you wish. So to determine if an object is "threatening" simply give it an attribute which says so.
Code:
donut = viz.add('donut.wrl')
donut.isThreatening = False
donut.isDelicious = True

gun = viz.add('gun.wrl')
gun.isThreatening = True
gun.isDelicious = False
Reply With Quote