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
  #1  
Old 10-07-2008, 03:10 PM
TrashcanPatrol TrashcanPatrol is offline
Member
 
Join Date: Aug 2008
Posts: 43
Using hotspots to enable opening doors

Hello, I have a question about hotspots. How is it possible to use a hotspot to enable someone to open a door?
What I'm looking for is for the player to walk up to a door, being right next to the door will enable him/her to actually use the command to open the door.

My code is as follows:
Code:
def onHotspot(id,x,y,z):
	if id == door:
             def mykeyboard(key):
  # If the user presses the e key do something
  if key == 'e':
    # Open the door
    door.runAction( vizact.spinto(0,1,0, -90, 30.0) )
		

viz.callback(viz.HOTSPOT_EVENT,onHotspot)
Now, I know that won't work as it is. How can I change it so that the player can only open the door when they're in the hotspot?
Thanks in advance
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 03:47 PM.


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