Notifications
Clear all

[Closed] Align Object – Pivot to Pivot?

[b]EDIT:

So I made a short video (1min and a half) so it can be clear what I need.
http://www.dailymotion.com/video/x61u197 [/b]

in this video I added link constraint to a sphere, then link sphere to a point, and then I Align it, so at the end I have result that sphere is moving together with a point. Simple scene.

I have script for first part of the action until I need to align it to a point, that part I dont know hot to solve in maxscript.
Macro recorder is not covering that part.
Also I tried many scripts from this forum but they didn’t worked for this. So I would appreciate if you can help to make this work.

AlignPivot $Point001 xyz

doesn’t give any results, reports error:
– Argument count error: AlignPivot wanted 1, got 2

5 Replies

I think you can find what you are after In this tread by Denis as usual short and clean

http://forums.cgsociety.org/showthread.php?t=1152914

You can choose position or rotation in alignment

If you need align to the transform of the object (not the object’s mesh transform) just change

rotation = inverse target.objecttransform.rotation

to

rotation = inverse target.transform.rotation

Tried, It doesn’t work for my sphere, all I have is one sphere and one point, need to align Position, pivot to pivot, as in screenshot.

The title of the tread is align Pivot to Pivot

If you need to align the pivot of an object to pivot of another object in position for example you want to align the pivot of sphere to the pivot of a point just type

$sphere001.pivot = $point001.pos

Also there is a text and screenshot where I explained what I want to repeat.
When I execute that script it doesn’t do what it does when I press Align button and Apply that dialog shown in Screenshot above – sphere moves to position where point helper is.

When I try that script nothing happen, only it returns this in listener:
[-28.8484,3.98637,0]

So I will explain what I have in a scene:
a sphere has link constraint controller and point added as a link.
point’s position is animated. I want to align a sphere to a point, as in screenshot above.
Now I tried to align a sphere to a point:

$sphere001.pos = $Point001.pivot

And sphere moves, but only in Y axis towards point,
How to align it in XYZ?