bharling
29-01-2009 12:57:46
hi all,
seems to be some sort of problem accessing the joystick state when using un-buffered joystick input.
above works fine but I cannot access the button data:
JoyStickState.mButtons is defined as type ogre.io.OIS._ois_._Bvector, which looks to me like its not properly exposed?
I can use buffered joystick instead, as the buttonPressed function on JoyStickListener takes 2 arguments, one of which is an int specifying which button is pressed. Just unbuffered is nicer for dealing with joypad sticks.
any help much appreciated as always
cheers,
seems to be some sort of problem accessing the joystick state when using un-buffered joystick input.
state = self.Joy.getJoyStickState()
self.rotationX = ogre.Degree( -state.mAxes[3].abs )
self.rotationY = ogre.Degree( -state.mAxes[2].abs )
above works fine but I cannot access the button data:
print state.mButtons[0]
TypeError: No to_python (by-value) converter found for C++ type: class std::_Vb_reference<unsigned int,int,class std::vector<bool,class std::allocator<bool> > >
JoyStickState.mButtons is defined as type ogre.io.OIS._ois_._Bvector, which looks to me like its not properly exposed?
I can use buffered joystick instead, as the buttonPressed function on JoyStickListener takes 2 arguments, one of which is an int specifying which button is pressed. Just unbuffered is nicer for dealing with joypad sticks.
any help much appreciated as always

cheers,