DirectInput MAXScript plugin for 3ds max 2011


#1

Recently I made this little plugin linked to Window’s DirectInput that adds a struct to MAXScript called DirectInputDevice

The members return values based on your controller input.
Example: by typing directinputdevice.x, the Listener returns 32767. Now, if I fully turn my joystick’s left analog stick to the right, it returns 65535.

Currently, only one control is supported. I have got only a single joystick, so I don’t have enough resources to add support for multiple controllers.

Note: IF YOU NOTICE THAT THE INSTALLATION OF THE PLUGIN CAUSED ANY PROBLEMS TO 3DS MAX, DELETE IT FROM THE PLUGINS FOLDER.

Download:
http://www.mediafire.com/?sharekey=n2rd4rrs3wbva


#2

Nice! You should post this in the SDK/maxscript forums, you’d probably get some better feedback.

-Johan


#3

Any idea if this will work with a spaceExplorer (3d mouse)?


#4

focomoso, I don’t know how SpaceExplorer works. If it uses DirectInput just like a generic joystick like any other, then at least its basic functions are guaranteed to work.
If, however, it uses the mouse device in DirectInput, then I am afraid you won’t be able to access the device state through the current version of the plugin (and yes, the mouse device has also a “Z” parameter, which is usually changed by the mouse scrollwheel).

I’ve enhanced the plugin considerably already, giving support for mouse and keyboard and making every function of these devices accessible, I just want to figure out some Struct issues from the SDK before releasing.

I also found out that for some reason 3ds max crashes if you install the (current) plugin and launch the program without a joystick connected, which is pretty bad. Well, it’s my first plugin and the SDK is not well documented. It’ll be fixed in the next version, of course.

Thank you.


#5

Thank you Johan. Maybe I would, I was not sure where to open this thread (I’m new to CGTalk :slight_smile: ).


#6

You should put it in scripts as there are a number of us there that just love playing with things like this.


#7

to be able to use a SpaceExplorer a DirectInput-Joystick, you will need this special driver:
http://www.3dconnexion.com/forum/viewtopic.php?t=336&postdays=0&postorder=asc&start=0

it´s aviable here for download: http://www.omniflux.com/devel/#rbc9

AFAIK, it only works good with a 32bit OS. There is a x64 build, but it doesn´t really work.

3dconnexion is supposed to work on a new driver wich will support the use of their devices as a DirectInput-Joystick. It´s in closed beta right now.


#8

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.