Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Using pointConstrain manitainOffset?

Using pointConstrain manitainOffset?

Anonymous
Not applicable
377 Views
3 Replies
Message 1 of 4

Using pointConstrain manitainOffset?

Anonymous
Not applicable
Hmmm, am I using this correctly?... I can't get that darn Root to snap onto the locator... the offset is still maintained.
--------------------

locatorRoot = mc.spaceLocator(p = (4,0,0))
mc.rename ('locator1' , 'locatorRoot')

jointRoot = mc.joint ()
mc.rename ('joint1', 'Root')

Root = mc.parent (w = True)

mc.pointConstraint ('locatorRoot','Root', mo=False)


-----------

Thx!
0 Likes
378 Views
3 Replies
Replies (3)
Message 2 of 4

lee.dunham
Collaborator
Collaborator
locatorRoot = mc.spaceLocator( p = (4,0,0), n='locatorRoot' )
jointRoot = mc.joint( n='Root' )
mc.pointConstraint( locatorRoot, jointRoot , mo=False )

Is that what your after?
There could be something else happening with your code as your expecting the objects orignal names to be correct to rename them.
Your also storing the names on creation in variables, but not using them. Instead try not to rely on names, make use of those variables.
0 Likes
Message 3 of 4

Anonymous
Not applicable
Thanks Lee,

Actually the problem is that the locator is moving , but the locator's pivot is not. How do I move the locator and it's pivot?... I think I need to use the absolute (a) move?...
0 Likes
Message 4 of 4

lee.dunham
Collaborator
Collaborator
hmm the locator shouldn't be moving as your constraining the joint to the locator, not the other way around.

or do you mean that the locator is being created at 4, 0, 0 but the pivot is at 0, 0, 0?

locatorRoot = mc.spaceLocator( n='locatorRoot' )
mc.move( 4, 0, 0, locatorRoot )
jointRoot = mc.joint( n='Root' )
mc.pointConstraint( locatorRoot, jointRoot , mo=False )


Is that more what your after?
0 Likes