WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rating: Thread Rating: 7 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 10-08-2008, 05:22 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
you could set a variable that is true when one is inside or false when outside of the hotspot. Then if the door key is pressed and the value is true you open the door.

here is a link to some code that keeps track of whether you have entered or left a hotspot. it also draws a circle where one of the hotspots is. Look at the code at the end of the post

http://www.worldviz.com/forum/showth...hlight=hotspot

then you could add something like

Code:
def onKeyDown(key):
	if key == 'e' and inHotspot == True:
		print "open the door"

viz.callback(viz.KEYDOWN_EVENT,onKeyDown)
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


All times are GMT -7. The time now is 09:50 AM.


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