WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rate Thread Display Modes
Old 11-18-2015, 09:15 AM
Qiliang He Qiliang He is offline
Join Date: Mar 2014
Posts: 24
Yield until joystick is deflected by a certain degree

I've read the example scripts of yield statement, but I don't know how to realize this function: The function won't go to the next line until the user deflected the joystick beyond a certain degree. Here's my code:

HTML Code:
def pointing_task(joystick)
      some codes
      return angle,result  ##result is false means the joystick isn't deflected  beyond a certain threshold

def start_pointing():			
      angle,result = pointing_task(joystick)
      yield result == True ??
      some codes

My question is, how to use the yield statement to pause the program until a user deflect the joystick beyond a certain degree and if he/she does, execute the following codes.

Thanks a lot!
Reply With Quote
Old 11-18-2015, 10:41 AM
Qiliang He Qiliang He is offline
Join Date: Mar 2014
Posts: 24
I got it. viztask.waitTrue() can do the job.
Reply With Quote

joystick, yield

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 03:58 AM
Changing Joystick navigation halfway through kmkm Vizard 1 07-01-2013 08:02 PM
joystick position nmohandes Vizard 2 01-16-2012 11:03 AM
exiting a yield statement starbug Vizard 2 01-12-2010 04:16 PM
Facetracking and Immersion Joystick Vygreif Vizard 1 01-25-2006 11:56 AM

All times are GMT -7. The time now is 08:46 AM.

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