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® Maya® / MEL / Move an object along another object's coordinate system?
  RSS 2.0 ATOM  

Move an object along another object's coordinate system?
Rate this thread
 
49717
 
Permlink of this thread  
avatar
  • MRAnim8or
  • Posted: 22 November 2010 07:02 AM
  • Total Posts: 36
  • Joined: 25 May 2010 08:59 PM

I have two unrelated objects in a scene, and I want to move one object (Object A) 1 meter forward along another’s x axis (Object B).  Object A and B both have different parents, constraints, etc.

Normally I’d just turn off autokey, then temporarily align Object A’s rotation to be the same as Object B and then move along A’s local x axis...then I’d rotate it back and turn back on autokey. Hacky, I know, but it works in most situations. The trouble is, due to referencing and our rig’s constraint system, I can’t temporarily rotate Object A.

Does anyone know of a direct way I can move one object along another’s axis?

IIRC, in MAXscript this command was basically:

in coordsys $ObjectB move $ObjectA 1 0 0

Thanks,
Mike



Replies: 0