Xbox 360 Controller & Maya (2) ROCKETS
Ok this is a fun one… Again it uses the wonderful Xbox360ControllerServer that Dave Moore wrote.
This script will create a rocket engine that is controllable with the right trigger of an Xbox 360 controller. Since the script utilizes Maya physics you can do all sorts of fun stuff. You can make rocket powered cars or tow things around or whatever you can imagine with physics. Here is how it works…
It takes the Input from the Right Trigger and maps it to an expression that controls the impulse of an active rigid body. So whatever way the rocket is pointed is the direction the rocket will go. Also I hooked up a particle emitter to it so that when you are applying thrust particles will shoot out. To get started just download the following and follow these easy steps. Also I have included a quicktime of the rocket in action in a few different scenarios. Don’t worry about the frame rate in the video. Fraps causes the frame rate to drop dramatically when you are capturing. I was consistently getting well over 60 fps.
Quicktime of the Rocket in action
Daves Xbox 360 Controller Server
1) To use first make sure the xbox 360 controller is installed and plugged in…
2) Install the Controller Server
3) Start the Controller Server. (This must always be running before you run the .mel script)
4) Open Maya and run xboxRocket.mel
5) At any time just hit the play button on the maya timeline and start hitting the right trigger on the controller!
Happy Boosting!
Now because its using maya physics you can add all sorts of jumps and whatnot to make a fun rocket playground. Make maya passive and active physics objects and watch them interact with the rocket.
To make a passive physics object (such as the ground or a jump)
1) Place a piece of polygon geometry in the world.
2) Select it and go to the maya Physics module
4) Click on the Soft/Rigid Bodies menu and then select Create Passive Rigid Body
Will this work with any (analog) game pad controller?
Hmmmm I think it will only work correctly with the xbox 360 controller…
Dude this sounds so awesome, I cant seem to pull it off, Im using maya 2009(64-bit) on Vista 64-bit.
Yeah I don’t think the controller plugin will work on the 64 bit version… Maybe someday I can bug dave into releasing one.
Hey Ryan,
I downloaded the ControllerServer binary file from your blog and toyed around with it in Maya. Really awsome. Here’s one of the things I created with joystick support. http://www.youtube.com/watch?v=YrjtPcMVPlA
Thanks!
Awesome! Good work! I have a bunch of other experiments I will post someday using this…
Hey very nice blog!!
Hi ryan, awesome stuff you made there. I managed to rig it onto a prototype car i made, and it really works! thing is, i have no clue as to how you did the node-setup. could you post a little tutorial on how to set this up? Because i really want to learn how this stuff works.
thanks,
Allert
Will do.
Thanks so much for the files, it was the real kick-off point for me attempting to prototype my game idea. I’m quit happy with the results but really need get multiplayer implemented to get a worthwhile play test. I’v looked thought the ControlerServer.cpp and it’s just way over my head to figure out how to make it support multiple controllers. I don’t think Dave Moore is responding so is there anyone else you know of who would interested in coding that?
well though it’s not ideal I did come up with a solution for 2 controller support if anyone’s interested
Sweet! Also I will bug Dave and see if he wants to take a stab at it.
Hi, thanks for this idea using the xbox controller.
I managed to connect it with a facial rig so that one can animate parts of the face in real time (acutally animating the whole face in several passes. first head+eyes, then yaw and mouth, then emotions etc…).
Works really well except that the xbox controller seems to only work correctly from time to time:
I start the server, start then maya 2008 32bit, load my scene and map the controls. But no signal from the gamepad arrives…
Has anyone an idea why it works sometimes and sometimes not?
Thank you for the info, this is definately going to help.