2008/11/18 Caleb Crome <Cal...@lo...>:
> Hello,
> I'm working on an application that uses a logitech force feedback steering
> wheel. I'm totally new to directpython, so sorry if this is a silly
> question.
> I was able to get information from the wheel, but I don't see any function
> calls to set Force Feedback parameters from the GameController object.
> My code so far is simple enough (below). How do I set forces and springs?
> Thanks so much,
> -Caleb
>
> #!/c/Python25/python25.exe
> import d3d
> import d3dx
> from d3dc import *
> class Turntable(d3dx.Frame):
> def onCreate(self):
> print "Creating..."
> self.joystick = d3dx.GameController(1)
> print self.joystick.hasForceFeedback()
> return
> def onUpdate(self):
> pass
> frame = Turntable(u"Turntable");
> frame.mainloop()
>
Unfortunately DirectPython does not support force feedback. Currently
you need to interact directly with DirectInput or maybe use some other
library to do force feedback. The C/C++-interface is exposed through
IDirectInputEffect and .dll's, so it is possible to use it through
comtypes, alotough that is not trivial.
DirectInput API itself is no longer updated by Microsoft (altough it
still works well and is widely supported) so I never really saw much
need to add support and testing for it.
--
Heikki Salo
|