WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-04-2008, 05:12 AM
krimble krimble is offline
Member
 
Join Date: Nov 2006
Location: Nijmegen
Posts: 63
using i900 joystick in a taskFunction

Hi,

What I'm trying to do is, using the buttons on the joystick to scale my virtual world. I'm using a task know, but it seems that the event doesn't get triggered when using "viz.SENSOR_UP_EVENT". If I use "viztask.waitSensorDown" then I don't know what to put in it as a button. I've tried the state things from the manual "joystickSensor.get()[7]" but it doesn't give me the actual pressed button wich I have to put in, right?

Code:
def scaleOnSensorEvent() :
	dataObject = viz.Data
	sensorData = joystickSensor.get()

	while True :
		yield viztask.waitEvent(viz.SENSOR_UP_EVENT, dataObject) 
#		yield viztask.waitSensorDown(joystickSensor, button??, dataObject)
		print "something"

if viz.get(viz.TRACKER):

	headSensor = viz.add('intersense.dls')
	viz.tracker()
	headSensor.reset()

	joystickSensor = viz.add('intersense.dls')
	viz.tracker()
	joystickSensor.reset()

viztask.schedule(scaleOnSensorEvent)
thanks for your help

Last edited by krimble; 06-04-2008 at 05:15 AM.
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
Joystick Navigation Vinicius Lima Vizard 7 10-23-2007 10:42 AM
Facetracking and Immersion Joystick Vygreif Vizard 1 01-25-2006 10:56 AM
problem with joystick data and input dialog box baf1 Vizard 4 03-03-2005 08:00 AM
Another Joystick Question Plasma Vizard 3 02-03-2004 11:16 AM
Basic Joystick Navigation Question Plasma Vizard 2 01-29-2004 07:08 PM


All times are GMT -7. The time now is 11:37 PM.


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