View Single Post
  #5  
Old 10-06-2011, 11:48 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
Sorry, I didn't pay attention to the subject here. In my last post I was referring to collisions regarding the physics engine. When handling viewpoint collision, the event object passed to the callback function has information about the node collided with, the point of contact and the name of the subnode:

http://docs.worldviz.com/vizard/Even...OLLISION_EVENT

The viz.COLLIDE_NOTIFY flag you mentioned is related to collision events with the physics engine, not viewpoint collision. When you enable viewpoint collision all objects will automatically be included. You can disable viewpoint collision for a specific object:
Code:
object.disable(viz.INTERSECTION)
If you have added two different objects, a room and a cube for the door you can check to see if the object is the cube:
Code:
def onCollision(info):
	if info.object == cube:
		#open door
	
viz.callback(viz.COLLISION_EVENT, onCollision)
Reply With Quote