Distance Constraint


Hey guys, I’ve posted this one in a couple of other forums, so apolgies if you’ve come across it before.

I’m trying to create/write a Distance Contraint in Maya (like the one found in XSI). to be able to contrain one object to a certain distance from another. (e.g. in a radius).

you can easily defin ethe distance between two objects using distanceDimension, but I have found no way of contraining this.

any idea’s?


How about using orient/point constraints and using the offset attribute?


can you explain what you mean by this? by creating any point constraint you wouldn’t be able to move the contrainted object at all.

I still want to be able to move the constrainted object, just not outside a shpere of influence - or distance.


Well, suppose you constrain two objects together via a point constraint. Select the pointConstraint Node in the Channel Box. There you will see Attributes called Offset X Offset Y and Offset Z amongst others. You can use those to “translate” your constrained object since the Original translate values are locked in the transform node by the pointConstraint.
I hope this helps

PS: Another approach would be to constraint a parent (group)node instead of the object itself


Hey Buexe, first off, thanks for replying. nice to get some help.

as for the constraint, the only problem with the method you discribed is that I want to be able to move the constrained object in the viewport, not just the channel box.

and, if I do put limits on the values in the channel box to limit the constrained object to a certain distance from the other, it gives it a cube shaped influence, not a sphere of influence which is what I’m after.


This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.