Call for Submission
NAB 2012 Best of the Best Show Reel
Submit your work today!
  • 1/3
You are here: Forum Home / Autodesk® MotionBuilder® / Python / map scripts to input device?
  RSS 2.0 ATOM  

map scripts to input device?
Rate this thread
 
46785
 
Permlink of this thread   Subscribe to this thread
avatar
  • steebu
  • Posted: 31 August 2010 01:43 PM
  • Total Posts: 42
  • Joined: 09 January 2007 01:40 PM

If I plug in a joystick is it possible to map scripts to various buttons and whatnot on the joystick?



Replies: 0
avatar
  • Trizoy
  • Posted: 01 September 2010 12:53 PM

It sure is :)

1)First, drop a ‘Script’ device into the scene.
2)Next, create a relation constraint, and add the script device as the receiver. 
3)Now you’ll want to add the script you’ve made to your scene.
4)At this point, you’ll see the script appear as an item within the ‘script device’; you’ll be able to connect things to it as you would any kBox.
5)Finally, drop your joystick device into the relation constraint, and connect your script with the desired button on the joystick. 

Note:  Keep in mind that the script event will trigger when a boolean value of 1 is reached from the joystick (how most joysticks indicate a button press).



Attachment Attachment
Replies: 0




   
  Settings Choose Theme color: