MotionBuilder Forum
Welcome to Autodesk’s MotionBuilder Forums. Share your knowledge, ask questions, and explore popular MotionBuilder topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

map scripts to input device?

3 REPLIES 3
Reply
Message 1 of 4
spark
770 Views, 3 Replies

map scripts to input device?

If I plug in a joystick is it possible to map scripts to various buttons and whatnot on the joystick?
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: spark

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).

Message 3 of 4
spark
in reply to: spark

As a follow-up to this, I'd like to map camera controls to a joystick, but I'm at a complete loss as to where to start.

If I drag a created Camera into the Relations or Expression constraint pane, I only get the camera's TRS.

For example, if I plugged in an XBox controller in and hit the "A" button, I'd like for that to toggle the "Lock Interest Navigation" checkbox.

If I move the right stick left or right I want to rotate around the interest point, etc.

As it is, the only values I can seemingly constrain are the camera's TRS?

Put simply, I want CTRL-SHIFT-LMB to get mapped to the right analog stick of the 360 controller.

Is that even possible?
Message 4 of 4
omnized
in reply to: spark

This might be what you want, or at least set on you on the right path to getting there 😉

http://gware.blogspot.com/2010/03/fps-camera-in-motion-builder-using.html

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report