View Single Post
  #5  
Old 01-29-2004, 04:39 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi Karthi,

Hotspots are only triggered when the viewpoint enters that area, not other objects. You will need to create a timer loop and manually check how far the avatars are from each other. Hear is some sample code that shows the basic idea:
Code:
import vizmat

AVATAR_DISTANCE = 2

def mytimer(num):
	distance = vizmat.Distance(a1.get(viz.POSITION),a2.get(viz.POSITION))
	if distance < AVATAR_DISTANCE:
		print 'Avatar1 and Avatar2 are near each other'
Good luck!
Reply With Quote