Home Technical Talk

Snapping angle of pivot to edge in Maya...

polycounter lvl 18
Offline / Send Message
Steve Schulze polycounter lvl 18
...or something. Basically I have to animate a bunch of cupboards with angled hinges. While I eventually worked out how to beat Maya into letting me rotate pivots, its pretty hard to get them lined up neatly on an edge. I wondering whether theres an option/script/whatever that will allow me to snap the pivot point to allign with an edge or some other technique that would have a similar result.

I haven't done much in the way of animation with Maya before, so I might be missing something obvious.

Replies

  • pyromania
    Options
    Offline / Send Message
    pyromania polycounter lvl 18
    Select your object then hit the insert key. This lets you move the pivot around. Now the trick to get it aligned to an edge is to hold the C key then move you mouse cursor over to the edge you want to snap to. Click the middle mouse button and move the mouse slightly while holding the middle mouse button. The pivot will jump to the edge. While you have the middle mouse button held you can slide the pivot along the edge. You can also do this with the V key for snapping to vertexs and the X key to snap to grid.
  • Steve Schulze
    Options
    Offline / Send Message
    Steve Schulze polycounter lvl 18
    That won't snap the angle though, will it? My problem is that I need to rotate the pivot so that my doors will open smoothly. Hang on, I'll do up a quick sketch...
    0c3.jpg
    Ok, so heres my awesome cupboard. Note the sides and door axis are slanted. What I want to do is have some way of snapping my pivot point to the angle of the door axis so that the thing will open smoothly without a lot of mucking about.
  • pyromania
    Options
    Offline / Send Message
    pyromania polycounter lvl 18
    Ah ok, theres a script for that on highend3d

    http://www.highend3d.com/maya/mel/?section=polygon&sort=dt_modified+desc

    mdAlignPivotToFace
  • malcolm
    Options
    Offline / Send Message
    malcolm polycount sponsor
    If you build the door not at an angle and then move the pivot point where you want you can then rotate the door into place and if you do not freeze the transform it will retain its correct rotation so you can then animate in only one axis to open the door, for example rotate y.
Sign In or Register to comment.