View Single Post
  #2  
Old 05-31-2011, 04:35 AM
levisii levisii is offline
Member
 
Join Date: Mar 2009
Posts: 8
Hi,

did you try the <vizjoy:joystick>.hasFFB() function? I was wondering too, why I'm not able to generate any ff-effect. Seems like the ffb-function of my joystick can't be identified. This is my testprogram:

Code:
import viz
import vizjoy

viz.go()
joystick = vizjoy.add()
print 'FFB = ' + str(joystick.hasFFB())

def joyButton(e):
	if e.button == 1:
		joystick.addForce(0.5,0)
		print '1'
		
	if e.button == 2:
		joystick.setForce(0,0.5)
		print '2'
		
	if e.button == 3:
		e.joy.addAction(vizjoy.recoil(0.8))
		print '3'
		
	if e.button == 4:
		e.joy.addAction(vizjoy.rumble(0.4))
		print '4'

viz.callback(vizjoy.BUTTONDOWN_EVENT,joyButton)
this is my print out:

** NOTIFY: 1 joystick(s) detected
1 - Logitech Force 3D Pro
** NOTIFY: Connected to Logitech Force 3D Pro
Supported: X Axis, Y Axis, Rz, Slider, 12 Buttons, Hat switch,
FFB = False
Reply With Quote