WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 04-14-2015, 09:43 AM
sportykourty sportykourty is offline
Member
 
Join Date: Mar 2015
Posts: 4
Proximity Sensor Event

So I was trying to incorporate the previous code but I'm stuck. does my sensor and target have to be in the same manager? I'm not really sure what I'm doing wrong but the function never executes.

Code:
sensor = vizproximity.Sensor(vizproximity.Sphere(15,center = [72,-.57,2]), source = avatar1)
manager.addSensor(sensor)

Avatar2Target = vizproximity.Target(avatar2)
Avatar2Manager.addTarget(Avatar2Target)

def HealthLoss(e):
	if e.target == Avatar2Target:
		print "Sensor Entered"
Avatar2Manager.onEnter(sensor1, HealthLoss)
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unexpected Avatar lookAt() behavior when using yield statements chris2307 Vizard 2 12-17-2013 02:58 AM
Avatar & Motion Capture Interface Angie Vizard 1 08-05-2010 06:17 PM
Collision of an avatar with a quad Frank Verberne Vizard 8 06-04-2008 09:44 AM
Looking through the eyes of an avatar Frank Verberne Vizard 2 04-01-2008 05:52 AM
How to make avatar's eyes to blink when speaking michelcm3 Vizard 12 01-15-2008 08:48 AM


All times are GMT -7. The time now is 02:54 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC