WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 01-13-2009, 05:39 AM
Sandro Holzer Sandro Holzer is offline
Member
 
Join Date: Jul 2008
Posts: 19
2 Joysticks / requirements

Hi

Is it possible to use 2 USB - Joysticks in one environment, and how to do it?
I would like to use one for driving a vehicle, and the other one to manipulate an arm from the Vehicle.
And what are general the requirements for Joysticks to use with the vizjoy module? Are they plug&play or do i have to install drivers?
For example would the Logitech Attack 3 work (or two of them).
Or the SPEED LINK - SL-6632 PC DARK TORNADO JOYSTICK ?

Sorry I canīt post links, because in our company websites that are game related are blocked.

Thanks in advance for your answers

Sandro
Reply With Quote
  #2  
Old 01-13-2009, 04:32 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Yes, each call to vizjoy.add() will return the next available joystick. Here is a sample script that shows how to connect to multiple joysticks:
Code:
import viz
import vizjoy
viz.go()

joy1 = vizjoy.add()
joy2 = vizjoy.add()

def joydown(e):
	if e.joy == joy1:
		print 'Joystick 1 button',e.button,'pressed'
	elif e.joy == joy2:
		print 'Joystick 2 button',e.button,'pressed'
	
viz.callback(vizjoy.BUTTONDOWN_EVENT,joydown)
Reply With Quote
Reply


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 06:22 AM.


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