View Single Post
  #2  
Old 07-01-2013, 07:02 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
Please wrap code with code tags to preserve indentation. Here's some example code that changes the speed based on a collision with an object that is not rendered:
Code:
torus = vizshape.addTorus(pos=[0,1.8,4])
torus.disable(viz.RENDERING)

def onCollision(info):
	if info.object == torus:
		moveSpeed += 1

viz.callback(viz.COLLISION_EVENT, onCollision)
If you use torus.visible(viz.OFF) the collision event will not get generated.
Reply With Quote