Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® MotionBuilder® / Autodesk MotionBuilder 2009 / Use Joystick to Control Objects LOCAL Translation
  RSS 2.0 ATOM  

Use Joystick to Control Objects LOCAL Translation
Rate this thread
 
48416
 
Permlink of this thread  
avatar
  • Total Posts: 6
  • Joined: 13 October 2010 04:39 PM

Hey MB Community,

I’m sure this question has been asked before, nevertheless I couldn’t find the answer so…

Can someone please tell me how to setup the Relationship contraint to allow for a Joystick to control the Local Navigation of an Object?

AKA, make it like a video games controls.

I currently have my setup so that (for example) pressing UP on the Joystick causes the Object to translate towards +Z by increment of X.  You can use Pull Vector to remember the global coordinate of the object (so it doesn’t snap back to the origin) and continue pressing UP to continue translating +Z.

My issue is that this is Global Translation… if the object rotates (either by using another object as Aim-At interest, or by assigning other buttons on the pad to rotate on a specific axis) pressing UP continues to move globally +Z.  Not “towards” where the object is facing.

Example:  From the origin, I press UP once (which is set to apply increments of 20 towards +Z) and am at global coordinate 0,0,20.  I rotate +90° on X-axis, facing my destination which is 20,0,20… however pressing up again brings me to 0,0,40.  My local device gizmo is pointing where I want to go, but I can’t get there.

Not a practical method to navigate with outside of being direct behind the object in an orthographic view....

If anyone can solve this, very VERY appreciate!!

-e

Notes to anyone who takes up the cause:

-It is appearing more practical to control rotation with an Interest (that is also translated locally) then with Rotation… that way you don’t have to solve the Global to Local conversion twice.

-Many controllers will in a neutral position return a value of 50, pressing (for example) left will go to 0, right to 100.  It’s easy to make this value go to a boolean, 0 or 1, just use GREATER THEN in the relationship editor… it’s a true or false result.



Replies: 0
avatar
  • 7ced7
  • Posted: 01 February 2011 03:20 AM

Hello,
Sorry for my bad English, I use google translation.
I think I have exactly the same problem as you but for the rotation. Did you find the solution?
In my case, I try to control the rotation of the bones having been previously animated in Maya with a “Motion Path”.
Add the animation from the joystick on the animation of rotation of existing bones. (I just spins in circles)
Right now, I can run without problems in my bones in addition to the existing animation but when I pass 180 ° rotating World at -180 ° flip it ...
Was this your problem? If so you have a solution?
thank you

ps : If I am misunderstood, I’ll post a youtube video



Replies: 0