#1
|
|||
|
|||
Joystick setForce
Hello all,
I have a (hopefully) quick question with regards to one of the joystick options, the <vizjoy:joystick>.setForce([x,y]) where [x,y] is the force vector you want to set to the FFB device. Has anyone used this command succesfully to moderate the strength of the FFB? There are no examples in the Help files.. Help!! How do I use this? What values can I put to the force vector? Thanks in advance!! |
#2
|
|||
|
|||
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) ** 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 |
#3
|
|||
|
|||
update:
Well, it was just a problem with the driver. The example is working now. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
changing the gain of a joystick during a program | Saz | Vizard | 4 | 06-25-2009 03:49 AM |
How to get the data from Logitech G25 racing wheel ? | fuyonggang | Vizard | 4 | 12-18-2008 06:14 PM |
writing joystick position to a data file | Saz | Vizard | 3 | 12-17-2008 05:18 AM |
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 |