PDA

View Full Version : DirectInput MAXScript plugin for 3ds max 2011


CaioSantana
08-06-2010, 08:19 PM
Recently I made this little plugin linked to Window's DirectInput that adds a struct to MAXScript called DirectInputDevice
http://content.screencast.com/users/adeonc/folders/Jing/media/ea2331aa-d3c7-483d-9252-fe8bb32d2ef7/2010-08-04_2025.png
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

JHN
09-06-2010, 11:11 AM
Nice! You should post this in the SDK/maxscript forums, you'd probably get some better feedback.

-Johan

focomoso
09-09-2010, 06:57 AM
Any idea if this will work with a spaceExplorer (3d mouse)?

CaioSantana
09-13-2010, 03:53 AM
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.

CaioSantana
09-13-2010, 04:00 AM
Nice! You should post this in the SDK/maxscript forums, you'd probably get some better feedback.Thank you Johan. Maybe I would, I was not sure where to open this thread (I'm new to CGTalk :) ).

PEN
09-24-2010, 10:01 PM
You should put it in scripts as there are a number of us there that just love playing with things like this.

raffo
10-09-2010, 03:58 PM
Any idea if this will work with a spaceExplorer (3d mouse)?
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.

CGTalk Moderation
10-09-2010, 03:58 PM
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.