View Single Post
  #1  
Old 07-31-2014, 10:28 AM
roobert roobert is offline
Member
 
Join Date: May 2014
Location: Pachuca, Hidalgo, México
Posts: 34
Send a message via Skype™ to roobert
Question Information associated with a model

Can I associate information to a model? so when I go in, this information is displayed

I use sensor proximity.

#Create proximity manager
manager = vizproximity.Manager()
manager.setDebug(viz.ON)

#Add main viewpoint as proximity target
target = vizproximity.Target(viz.MainView)
manager.addTarget(target)

#MODEL
newTarget=viz.add('model/objeto.dae', pos=[0,0,0])
newTarget.collideBox()
newTarget.alpha(0.8)
sensor = vizproximity.addBoundingSphereSensor(newTarget,sca le=2)
manager.addSensor(sensor)

#ACTIVE SENSOR
def EnterProximity(e):
print "SHOW INFORMATION"

#OFF SENSOR
def ExitProximity(e):
print "HIDDEN INFORMATION"
Reply With Quote